CS201-Midterm
1 / 50
Which looping process is best, when the number of iterations is known?
2 / 50
If the elements of an array are already sorted then the useful search algorithm is,
3 / 50
When we are using const keyword with a variable x then initializing it at the time of declaration is,
4 / 50
If an array has 100 elements, what is allowable range of subscripts?
5 / 50
Declaring structures does not mean that memory is allocated.
6 / 50
In C/C++ language the header file which is used to perform useful task and manipulation of character data is
7 / 50
What's wrong with this for loop? for (int k = 2, k <=12, k++)
8 / 50
Consider the following code segment. What will the following code segment display? int main(){
int age[10] = {0};
cout << age ;
}
9 / 50
If the file is not properly closed in the program, the program ____________.
10 / 50
Word processor is
11 / 50
The condition in while loop may contain logical expression but not relational expression.
12 / 50
Which of the following functionreturns the size of a string variable?
13 / 50
In C/C++ the #include is called,
14 / 50
The data type before a function name represents its,
15 / 50
In Program commenting the code liberally is
16 / 50
Paying attention to detail in designing a program is _________
17 / 50
When a pointer is incremented, it actually jumps the number of memory addresses
18 / 50
Initialization of variable at the time of definition is,
19 / 50
Each pass through a loop is called a/an
20 / 50
What will be the value of ‘a’ and ‘b’ after executing the following statements?
a = 3; b = a++;
21 / 50
How many total elements must be in two-dimensional array of 3 rows and 2 columns?
22 / 50
What will be the correct syntax for initialization of pointer ptr with string "programming"?
23 / 50
There are mainly------------------- types of software
24 / 50
Carefully analyze the following lines of code and chose the correct option.
ch1=”a”;
ch2=’a’;
25 / 50
Pointer is a variable which store
26 / 50
The ________ statement interrupts the flow of control.
27 / 50
A continue statement causes execution to skip to
28 / 50
The function of cin is
29 / 50
The return type of a function that do not return any value must be __________
30 / 50
Dealing with structures and functions passing by reference is the most economical method
31 / 50
Which of the following header file defines the rand() function?
32 / 50
What is the correct syntax to declare an array of size 10 of int data type?
33 / 50
43.For which array, the size of the array should be one more than the number of elements in an array?
34 / 50
An array is also called
35 / 50
What is the output of the following statement?
int i = 2.5; do { cout i * 2; } while (i > 3 && i < 10);
36 / 50
What does !(7) evaluate to in decimal where ! is a NOT operator?
37 / 50
In C/C++ the string constant is enclosed
38 / 50
The Compiler of C language is written in
39 / 50
The remainder (%) operator is,
40 / 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++ ;
41 / 50
What does 5 ^ 6 , evaluate to in decimal where ‘^’ is Exclusive OR operator?
42 / 50
UNIX has been developed in ________ language.
43 / 50
Preprocessor program perform its function before ______ phase takes place.
44 / 50
How many bytes will the pointer INTPTR of type int move in the following statement? intPtr += 3 ;
45 / 50
If the break statement is missed in switch statement then,
46 / 50
We want to access array in random order which approach is better?
47 / 50
The correct syntax of do-while loop is,
48 / 50
What will be the result of expression x%= 2, if x = 7?
49 / 50
Computer can understand only machine language code.
50 / 50
In order to get 256 from the number 2568 we divide this number by 10 and take,
Your score is
The average score is 73%
Restart quiz