Home / CSE MCQs / C++ - MCQs :: Discussion

Discussion :: C++ - MCQs

  1. Pick out the correct statement.
  2. A.
    A derived class's constructor cannot explicitly invokes its base class's constructor.
    B.
    A derived class's destructor cannot invoke its base class's destructor.
    C.
    A derived class's destructor can invoke its base class's destructor.
    D.
    None of the mentioned

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    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.


Be The First To Comment