CS201-Midterm
1 / 50
Which of the following header file include string conversion functions?
2 / 50
Computer can understand only machine language code.
3 / 50
The Compiler of C language is written in
4 / 50
Each pass through a loop is called a/an
5 / 50
How many bytes will the pointer INTPTR of type int move in the following statement? intPtr += 3 ;
6 / 50
For which values of the integer _value will the following code becomes an infinite loop?
int number=1;
while (true) {
cout << number;
if (number == 3) break;
number += integer_value; }
any number other than 1 or 2
7 / 50
If the elements of an array are already sorted then the useful search algorithm is,
8 / 50
Initialization of variable at the time of definition is,
9 / 50
When a pointer is incremented, it actually jumps the number of memory addresses
10 / 50
Which of the following is an extension of header file?
11 / 50
If an array has 100 elements, what is allowable range of subscripts?
12 / 50
What's wrong with this for loop? for (int k = 2, k <=12, k++)
13 / 50
Which of the following functionreturns the size of a string variable?
14 / 50
Dealing with structures and functions passing by reference is the most economical method
15 / 50
If the break statement is missed in switch statement then,
16 / 50
Which of the following header file defines the rand() function?
17 / 50
Which looping process is best, when the number of iterations is known?
18 / 50
Word processor is
19 / 50
What does !(7) evaluate to in decimal where ! is a NOT operator?
20 / 50
How many bytes are occupied by declaring following array of characters? char str[] = “programming”;
21 / 50
Analysis is the -------------- step in designing a program
22 / 50
A continue statement causes execution to skip to
23 / 50
Pointer is a variable which store
24 / 50
The correct syntax of do-while loop is,
25 / 50
When an array element is passed to a function, it is passed by ----------------.
26 / 50
In C/C++ the #include is called,
27 / 50
The size of a double variable is
28 / 50
Most efficient method of dealing with structure variables is to define the structure globally
29 / 50
In C/C++ language the header file which is used to perform useful task and manipulation of character data is
30 / 50
When we declare a multidimensional array the compiler store the elements of multidimensional array in the form of,
31 / 50
Commenting the code ___________
32 / 50
Consider the following code segment. What will the following code segment display? int main(){
int age[10] = {0};
cout << age ;
}
33 / 50
Carefully analyze the following lines of code and chose the correct option.
ch1=”a”;
ch2=’a’;
34 / 50
In C/C++ the string constant is enclosed
35 / 50
The function of cin is
36 / 50
What will be the result of expression x%= 2, if x = 7?
37 / 50
There are mainly------------------- types of software
38 / 50
&& is------------------ operator.
39 / 50
If we want to store a string “abc” in an array str then the size of this array must be at least,
40 / 50
Which of the following is the starting index of an array in C++?
41 / 50
If there are 2(n+1) elements in an array then what would be the number of iterations required to search a number using binary search algorithm?
42 / 50
What will be the value of ‘a’ and ‘b’ after executing the following statements?
a = 3; b = a++;
43 / 50
What will be the correct syntax for initialization of pointer ptr with string "programming"?
44 / 50
The data type before a function name represents its,
45 / 50
Preprocessor program perform its function before ______ phase takes place.
46 / 50
How many parameter(s) function getline() takes?
47 / 50
Searching is easier when an array is already sorted
48 / 50
The variables having a name, type and size are just like empty boxes.
49 / 50
C is widely known as development language of _______ operating system.
50 / 50
In Program commenting the code liberally is
Your score is
The average score is 73%
Restart quiz