Explore topic-wise MCQs in Object Oriented Programming Using C++.

This section includes 5 Mcqs, each offering curated multiple-choice questions to sharpen your Object Oriented Programming Using C++ knowledge and support exam preparation. Choose a topic below to get started.

1.

When an object is passed to a function, its copy is made in the function and then ______________

A. The destructor of the copy is called when function is returned
B. The destructor is never called in this case
C. The destructor is called but it is always implicit
D. The destructor must be user defined
Answer» B. The destructor is never called in this case
2.

Which among the following is correct for the destructors concept?

A. Destructors can be overloaded
B. Destructors can have only one parameter at maximum
C. Destructors are always called after object goes out of scope
D. There can be only one destructor in a class
Answer» E.
3.

Global destructors execute in ___________ order after main function is terminated.

A. Sequential
B. Random
C. Reverse
D. Depending on priority
Answer» D. Depending on priority
4.

Destructors doesn t accept parameters.

A. True
B. False
Answer» B. False
5.

If in multiple inheritance, class C inherits class B, and Class B inherits class A. In which sequence are their destructors called if an object of class C was declared?

A. ~C() then ~B() then ~A()
B. ~B() then ~C() then ~A()
C. ~A() then ~B() then ~C()
D. ~C() then ~A() then ~B()
Answer» B. ~B() then ~C() then ~A()