Question: Suppose class A inherits from base class B. What is the order in which their constructors and destructors will be called when an object of

Suppose class A inherits from base class B. What is the order in which their constructors and destructors will be called when an object of class A is instantiated and then destroyed?

Select one:

a.

B constructor, A constructor, A destructor, B destructor.

b.

A constructor, B constructor, A destructor, B destructor

c.

B constructor, A constructor, B destructor, A destructor

d.

A constructor, B constructor, B destructor, A destructor

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!