C++/OOP MCQs

C++ / OOP MCQs for test, Interview preparation


1. The ________________ operator is called as insertion operator.

a. <<

b. >>

c. {

d. |


2. Which of them are correct.

i. A static function can, have access to only other, static members (functions or variables), declared in the same class.

ii. A static member function, can be called using the class, name (instead of its object).

a. False, True

b. True, True

c. False, False

d. True, False


3. Which one of the following, condition is true for, an object used as a, function argument?

i. A copy of the entire objects is passed to the funtion.

ii. Only the address of the object is transferred to the function.

a. Both i and ii

b. Not i nor ii

c. only i

d. only ii


4. _______________enable us to hide, inside the object, both the data fields, and the methods that, act on that data.

a. Structure

b. Encapsulation

c. Inheritance

d. None


5. Which of them, are the characteristics of “friend” function.

a. It is not the scope of the class to which it has been declared as friend.

b. It belongs to that class from where this function declared.

c. Both A & B

d. None


6. Which of the following is a dereferencing operator.

a. *

b. >/

c. ->*

d. <->


7. A class whose instances are also classes.

a. Strong Class

b. derivated class

c. Meta Class

d. None


8. A Constructor with parameters Nil is:

a. Default constructor

b. Parent class constructor

c. Child class constructor

d. None


9. A special member function used to automatic initialize the object is:

a. Type casting

b. Class

c. Constructor

d. None


10. ________________ takes a reference, to an object of the, same class as itself as, an argument.

a. Copy constructor

b. Derived class

c. reference argument

d. None


Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button