1 ) An array element is accessed using ………….. ,
A ) a first-in-first-out approach .
B ) the dot operator .
C ) a member name .
D ) an index number .
Correct answers: D ) an index number .
2 ) The dot operator (or class member access operator) connects the following two entities (reading from left to right) : -
A ) A class member and a class object ,
B ) A class object and a class ,
C ) A class and a member of that class ,
D ) A class object and a member of that class ,
Correct answers : - D ) A class object and a member of that class ,
3 ) In a class you can have more than one constructor with the same name .
A ) True ,
B ) False ,
Correct answers : - A ) True ,
4 ) A member function can always access the data ……….. ,
A ) in the object of which it is a member .
B ) in the class of which it is a member .
C ) in any object of the class of which it is a member .
D ) in the public part of its class .
Correct answers : - A ) in the object of which it is a member .
5 ) For the object for which it was called , a const member function .
A ) can modify both const and non-const member data .
B ) can modify only const member data .
C ) can modify only non-const member data .
D ) can modify neither const nor non-const member data .
Correct answers : - D ) can modify neither const nor non-const member data .
6 ) If you declare a const object , it can only be used with const member functions .
A ) True ,
B ) False ,
Correct answers : - A ) True ,
7 ) Element doubleArray[7] is which element of the array ?
A ) The sixth ,
B ) The seventh ,
C ) The eighth ,
D ) Impossible to tell ,
Correct answers : - C ) The eighth ,
8 ) When a multidimensional array is accessed, each array index is ……………. ,
A ) surrounded by brackets .
B ) separated by commas .
C ) surrounded by brackets and separated by commas .
D ) separated by commas and surrounded by brackets .
Correct answers : - A ) surrounded by brackets .
9 ) In C++ there can be an array of four dimensions .
A ) True ,
B ) False ,
Correct answers : - A ) True ,
10 ) You can read input that consists of multiple lines of text using ………………. ,
A ) the normal cout << combination .
B ) the cin.get() function with one argument .
C ) the cin.get() function with two arguments .
D ) the cin.get() function with three arguments .
Correct answers : - D ) the cin.get() function with three arguments .
0 Comments