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

  • (A) Only 2 ,4
  • (B) Only 1 , 4
  • (C) Only 2, 3
  • (D) Only 1 , 3
πŸ’¬ Discuss
βœ… Correct Answer: (B) Only 1 , 4

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
208
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
82%
Success Rate