CS201-Midterm
1 / 50
25.What will be the range of numbers generated by function rand () % 9?
2 / 50
Dealing with structures and functions passing by reference is the most economical method
3 / 50
Preprocessor program perform its function before ______ phase takes place.
4 / 50
What will be the result of expression x%= 2, if x = 7?
5 / 50
What will be the value of ‘a’ and ‘b’ after executing the following statements?
a = 3; b = a++;
6 / 50
How many bytes are occupied by declaring following array of characters? char str[] = “programming”;
7 / 50
The correct syntax of do-while loop is,
8 / 50
How many parameter(s) function getline() takes?
9 / 50
Pointer is a variable which store
10 / 50
The condition in while loop may contain logical expression but not relational expression.
11 / 50
Which of the following is the starting index of an array in C++?
12 / 50
What is the correct syntax to declare an array of size 10 of int data type?
13 / 50
When a pointer is incremented, it actually jumps the number of memory addresses
14 / 50
When we are using const keyword with a variable x then initializing it at the time of declaration is,
15 / 50
If the break statement is missed in switch statement then,
16 / 50
When a call to function statement is encountered,
17 / 50
Syntax of union is identical to ______
18 / 50
Paying attention to detail in designing a program is _________
19 / 50
How many bytes will the pointer INTPTR of type int move in the following statement? intPtr += 3 ;
20 / 50
Which of the following functionreturns the size of a string variable?
21 / 50
What will be the correct syntax to initialize all elements of two-dimensional array to value 0?
22 / 50
Searching is easier when an array is already sorted
23 / 50
What will be the value of i and j in the following code segment?
int i, j ;
int x[5] = {2, 3, 4, 8, 9} ;
int *ptr =&x[2];
i = (*ptr)++ ;
j = *ptr++ ;
24 / 50
In C/C++ the #include is called,
25 / 50
What does !(7) evaluate to in decimal where ! is a NOT operator?
26 / 50
Which of the following header file defines the rand() function?
27 / 50
Which character is inserted at the end of string to indicate the end of string?
28 / 50
Which of the following is the correct way to assign an integer value 5 to element of a matrix say ‘m’ at second row and third column?
29 / 50
Commenting the code ___________
30 / 50
In flow chart, the symbol used for decision making is,
31 / 50
The Compiler of C language is written in
32 / 50
If the file is not properly closed in the program, the program ____________.
33 / 50
The address operator (&) can be used with,
34 / 50
Which of the following header file include string conversion functions?
35 / 50
When we declare a multidimensional array the compiler store the elements of multidimensional array in the form of,
36 / 50
If the elements of an array are already sorted then the useful search algorithm is,
37 / 50
What does 5 ^ 6 , evaluate to in decimal where ‘^’ is Exclusive OR operator?
38 / 50
In C/C++ the string constant is enclosed
39 / 50
C++ views each file as a sequential stream of________________ .
40 / 50
What will be the correct syntax for initialization of pointer ptr with string "programming"?
41 / 50
C is widely known as development language of _______ operating system.
42 / 50
Carefully analyze the following lines of code and chose the correct option.
ch1=”a”;
ch2=’a’;
43 / 50
We want to access array in random order which approach is better?
44 / 50
Word processor is
45 / 50
UNIX has been developed in ________ language.
46 / 50
Which of the following is an extension of header file?
47 / 50
Initialization of variable at the time of definition is,
48 / 50
The variables having a name, type and size are just like empty boxes.
49 / 50
Most efficient method of dealing with structure variables is to define the structure globally
50 / 50
In Program commenting the code liberally is
Your score is
The average score is 73%
Restart quiz