CS201-Midterm
1 / 50
If we want to store a string “abc” in an array str then the size of this array must be at least,
2 / 50
UNIX has been developed in ________ language.
3 / 50
The data type before a function name represents its,
4 / 50
A continue statement causes execution to skip to
5 / 50
Which of the following header file defines the rand() function?
6 / 50
When a call to function statement is encountered,
7 / 50
An array is also called
8 / 50
The size of int data type is
9 / 50
Initialization of variable at the time of definition is,
10 / 50
We want to access array in random order which approach is better?
11 / 50
In if structure the block of statements is executed only,
12 / 50
Syntax of union is identical to ______
13 / 50
In Program commenting the code liberally is
14 / 50
C++ views each file as a sequential stream of________________ .
15 / 50
25.What will be the range of numbers generated by function rand () % 9?
16 / 50
Consider the following code segment. What will the following code segment display? int main(){
int age[10] = {0};
cout << age ;
}
17 / 50
What will be the result of arithmetic expression 6+27/3*3?
18 / 50
The ________ statement interrupts the flow of control.
19 / 50
How many total elements must be in two-dimensional array of 3 rows and 2 columns?
20 / 50
What does 5 | 6 , evaluate to in decimal where ‘|’ is bitwise OR operator?
21 / 50
What will be the correct syntax for initialization of pointer ptr with string "programming"?
22 / 50
In flow chart, the symbol used for decision making is,
23 / 50
If the elements of an array are already sorted then the useful search algorithm is,
24 / 50
Which of the following is an extension of header file?
25 / 50
Computer can understand only machine language code.
26 / 50
Which of the following functionreturns the size of a string variable?
27 / 50
In order to get 256 from the number 2568 we divide this number by 10 and take,
28 / 50
Paying attention to detail in designing a program is _________
29 / 50
In C/C++ the string constant is enclosed
30 / 50
What will be the value of ‘a’ and ‘b’ after executing the following statements?
a = 3; b = a++;
31 / 50
What will be the result of expression x%= 2, if x = 7?
32 / 50
The remainder (%) operator is,
33 / 50
The function of cin is
34 / 50
C is widely known as development language of _______ operating system.
35 / 50
There are mainly------------------- types of software
36 / 50
Analysis is the -------------- step in designing a program
37 / 50
How many parameter(s) function getline() takes?
38 / 50
Member function tellg() returns the current location of the _____________ pointer.
39 / 50
Which looping process is best, when the number of iterations is known?
40 / 50
When we declare a multidimensional array the compiler store the elements of multidimensional array in the form of,
41 / 50
Which of the following is the starting index of an array in C++?
42 / 50
Which of the following is the correct statement for the following declaration?
43 / 50
Which character is inserted at the end of string to indicate the end of string?
44 / 50
What is the correct syntax to declare an array of size 10 of int data type?
45 / 50
A precise sequence of steps to solve a problem is called
46 / 50
In C/C++ the #include is called,
47 / 50
The size of a double variable is
48 / 50
If the file is not properly closed in the program, the program ____________.
49 / 50
Which of the following function(s) is/are included in stdlib.h header file?
50 / 50
When an array element is passed to a function, it is passed by ----------------.
Your score is
The average score is 73%
Restart quiz