July 7, 2021 in C and CPP
What is meant by structure data type?
b) What is meant by structure data type? How do we reference the elements of a structure?
Give example of how a value of a structure can be assigned to another structure.
July 7, 2021 in C and CPP
b) What is meant by structure data type? How do we reference the elements of a structure?
Give example of how a value of a structure can be assigned to another structure.
July 7, 2021 in C and CPP
a) Write a program to compute the following series:
x + x^3 / 3! + x^5/ 5! + …
To a given accuracy for x from 00 to 1800 in the steps of 100, use a inbuilt function FACT(n) to compute the factorial.
July 7, 2021 in C and CPP
a) Write a ‘C’ program to read an array of names and to sort them in alphabetical order.
b) What are different storage classes in ‘C’? Explain each.
July 7, 2021 in C and CPP
b) What is meant by formatted output? Mention the output of the following commands.
int n = 28;
i) printf ( “% 5d,”n);
ii) printf ( “%+5d”, n);
iii) printf ( “%+5d”, n);
c) Write a recursive function to compute factorial of a number.
July 7, 2021 in C and CPP
a) Make the flow chart to solve the following cosine series.
S = 1 – x2/ 2! + x4/ 4! – x6/ 6! + … 100 terms
July 7, 2021 in C and CPP
A. static B. calloc() C. main()
D. char E. free() F. Right to left
G. Close and disconnect
the file from
H. Left to right I. register
J. atoi() K. putpanel() L. stdin
M. stdout
4.1 ________ is the function to convert a ASCII character into an integer.
4.2 In C an array of character is known as ________.
4.3 The line from which a program execution begins is ________.
4.4 ________ function is used to release the memory allotted in dynamic memory allocation.
4.5 The dynamic memory allocation function are ________ and malloc().
4.6 p++ has associativity ________.
4.7 The use of ________ is considered unstructured programming.
4.8 The storage class ________ has global visibility.
4.9 The standard file, in ‘C’, ________ is connected to screen.
4.10 ________ is used to draw a point on the monitor screen in given coordinate position.
July 7, 2021 in C and CPP
Each statement below is either TRUE or FALSE. Choose the most appropriate one
and ENTER in the “tear-off” sheet attached to the question paper, following
instructions therein.
2.1 A break statement is used to exit from a statement block in a switch statement.
2.2 Recursion cannot call a function itself.
2.3 An array is a group of related data item that share a common memory location in RAM.
2.4 In the declaration int(*p)() p is a pointer to a function that returns an integer.
2.5 If m = 5, ++m + ++m is equal to 12.
2.6 The memory required in structure is less than union.
2.7 A function in ‘C’ must have at least one argument.
2.8 The programming language happens to be the high level language with some assembly
language features.
2.9 In C functions the actual expressions / parameters are passed on to formal parameters
using the method of call by value result
2.10 In C the graphics may be used to add graphical features to the program.
July 7, 2021 in C and CPP
1.10 pow(x,y) is used to
A) power of yx
B) power of xy
C) logarithm of x on the base y
D) Such function does not exist
July 7, 2021 in C and CPP
1.9 Which of the following a not a basic data type used in C language?
A) double
B) float
C) char
D) array
July 7, 2021 in C and CPP
1.8 If ‘a’ is an integer variable, then a = 5/2 will return a value
A) 2.5
B) 2
C) 2.000000
D) 2.500000