CS201-Midterm
1 / 50
Carefully analyze the following lines of code and chose the correct option.
ch1=”a”;
ch2=’a’;
2 / 50
Which of the following is an extension of header file?
3 / 50
Analysis is the -------------- step in designing a program
4 / 50
UNIX has been developed in ________ language.
5 / 50
The variables having a name, type and size are just like empty boxes.
6 / 50
The function of cin is
7 / 50
In Flow chart process is represented by
8 / 50
The correct syntax of do-while loop is,
9 / 50
We want to access array in random order which approach is better?
10 / 50
When we are using const keyword with a variable x then initializing it at the time of declaration is,
11 / 50
Initialization of variable at the time of definition is,
12 / 50
In C/C++ the string constant is enclosed
13 / 50
Dealing with structures and functions passing by reference is the most economical method
14 / 50
In if structure the block of statements is executed only,
15 / 50
How many bytes will the pointer INTPTR of type int move in the following statement? intPtr += 3 ;
16 / 50
When an array element is passed to a function, it is passed by ----------------.
17 / 50
The size of a double variable is
18 / 50
Which of the following functionreturns the size of a string variable?
19 / 50
The remainder (%) operator is,
20 / 50
Declaring structures does not mean that memory is allocated.
21 / 50
Preprocessor program perform its function before ______ phase takes place.
22 / 50
Which of the following function(s) is/are included in stdlib.h header file?
23 / 50
Computer can understand only machine language code.
24 / 50
&& is------------------ operator.
25 / 50
Commenting the code ___________
26 / 50
In C/C++ the #include is called,
27 / 50
In Program commenting the code liberally is
28 / 50
Which of the following header file include string conversion functions?
29 / 50
Word processor is
30 / 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
31 / 50
When a call to function statement is encountered,
32 / 50
25.What will be the range of numbers generated by function rand () % 9?
33 / 50
Paying attention to detail in designing a program is _________
34 / 50
The return type of a function that do not return any value must be __________
35 / 50
If the file is not properly closed in the program, the program ____________.
36 / 50
An array is also called
37 / 50
Searching is easier when an array is already sorted
38 / 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?
39 / 50
How many parameter(s) function getline() takes?
40 / 50
What will be the correct syntax for initialization of pointer ptr with string "programming"?
41 / 50
C is a/an ______ language
42 / 50
What does !(7) evaluate to in decimal where ! is a NOT operator?
43 / 50
Which character is inserted at the end of string to indicate the end of string?
44 / 50
Consider the following code segment. What will the following code segment display? int main(){
int age[10] = {0};
cout << age ;
}
45 / 50
The Compiler of C language is written in
46 / 50
Most efficient method of dealing with structure variables is to define the structure globally
47 / 50
In C/C++ language the header file which is used to perform useful task and manipulation of character data is
48 / 50
Pointer is a variable which store
49 / 50
If the elements of an array are already sorted then the useful search algorithm is,
50 / 50
When we declare a multidimensional array the compiler store the elements of multidimensional array in the form of,
Your score is
The average score is 73%
Restart quiz