Home » C++ Programming » Classes & Objects » Question
  1. Pick out the correct statement.
    1. A derived class’s destructor can invoke its base class’s destructor
    2. A derived class’s constructor cannot explicitly invokes its base class’s constructor
    3. A derived class’s destructor cannot invoke its base class’s destructor
    4. All of above
    5. None of these
Correct Option: C

Destructors are automatically invoked when a object goes out of scope or when a dynamically allocated object is deleted. Inheritance does not change this behavior. This is the reason a derived destructor cannot invoke its base class destructor.



Your comments will be displayed only after manual approval.