Top 150+ Solved Object Oriented Programming with C++ (OOP in C++) MCQ Questions Answer
Q. Which of the following statement is correct?
a. A constructor has the same name as the class in which it is present.
b. A constructor has a different name than the class in which it is present.
c. A constructor always returns an integer.
d. A constructor cannot be overloade
Q. Destructor calls are made in which order of the corresponding constructor calls?
a. Reverse order
b. Forward order
c. Depends on how the object is constructed
d. Depends on how many objects are constructed
Q. Which of the following never requires any arguments?
a. Member function
b. Friend function
c. Default constructor
d. const function
Q. A class's __________ is called when an object is destroyed.
a. constructor
b. destructor
c. assignment function
d. copy constructor
Q. To ensure that every object in the array receives a destructor call, always delete memoryallocated as an array with operator __________ .
a. destructor
b. New[]
c. delete[]
d. Free()
Q. Which of the following statement is correct whenever an object goes out of scope?
a. The default constructor of the object is called.
b. The parameterized destructor is called.
c. The default destructor of the object is called.
d. None of the above.
Q. Which allows you to create a derived class that inherits properties from more than one base class?
a. Multilevel inheritance
b. Multiple inheritance
c. Hybrid Inheritance
d. Hierarchical Inheritanc
Q. Which feature in OOP allows reusing code?
a. Polymorphism
b. Inheritance
c. Encapsulation
d. Data hiding
Q. The mechanism of deriving a new class from another class
a. Polymorphism
b. Inheritance
c. Encapsulation
d. Data hiding
Q. A derived class with only one base class
a. Multilevel inheritance
b. Multiple inheritance
c. Single inheritance
d. Hierarchical Inheritance
Q. The mechanism of deriving one base class with more than one derived classes
a. Multilevel inheritance
b. Multiple inheritance
c. Hybrid Inheritance
d. Hierarchical Inheritance
Q. The duplication of inherited members due to the multiple paths can be avoided by making acommon base class is called
a. Abstract class
b. Virtual base class
c. Multiple inheritance
d. Nesting of classes
Q. The class that is not used to create object
a. Abstract class
b. Virtual base class
c. Multiple inheritance
d. Nesting of classes
Q. The mechanism of giving special meaning to an operator
a. Operator overloading
b. Function overloading
c. Constructor overloading
d. Virtual function