Derived class having constructor & destructor - Features - Inheritance
Q. In case of inheritance where both base and derived class are having constructor and destructor, then which if the following are true ?
1. Constructors are executed in their order of derivation
2. Constructors are executed in reverse order of derivation
3. Destructors are executed in their order of derivation
4. Destructors are executed in reverse order of derivation- Published on 17 Jul 15a. Only 2 ,4
b. Only 1 , 3
c. Only 1 , 4
d. Only 2, 3
ANSWER: Only 1 , 4