Vidyalelo
C++ Programming · Q28

Constructors and Destructors in C++

Programming · C++ Programming · question 28

Q28

In C++, what is the order of constructor and destructor calls for a class hierarchy?

A.
Constructors: Derived to Base, Destructors: Base to Derived
B.
Constructors and Destructors follow the same order
C.
Constructors: Base to Derived, Destructors: Derived to Base
Answer
D.
Constructors: Derived to Base, Destructors: Derived to Base

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board