Suppose class Child is derived from class Parent that was in turn derived from class GrandParent.When we destroy an object of class Child,three destructors are called: i) Child,ii) Parent,iii ) GrandParent..What is the order?
A) Child,Parent,GrandParent
B) Parent,GrandParent,Child
C) GrandParent,Child,Parent
D) GrandParent,Parent,Child
Correct Answer:
Verified
Q17: The class D inherits from base class
Q18: In C++,inheritance has much to do with
Q19: When class D is derived from class
Q20: If class D is derived from class
Q21: Which of the following is correct syntax
Q23: Given the class below,tell to what value
Q24: Suppose class Child is derived from class
Q25: In the code for HourlyEmployee that is
Q26: What are the benefits of inheritance and
Q27: When a derived class inherits from a
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents