Write a program to show the execution of constructor and destructor in case of multiple inheritance. Also show the output

How to write this program-:

since it is multiple inheritance, so make 2 base classes and 1 derived class.

we need to show the constructor and destructor invocation, so create constructors and destructors and enter some information within them.

eg-: cout<<“this is base class constructor”;

From the int main function, use the method of calling constructors


or just create a derived class object and done.


 Base1 class constructor

Base2 class constructor

derived class constructor

derived class destructor

Base2 class destructor

Base1 class destructor

Leave a Comment

Your email address will not be published. Required fields are marked *

Do NOT follow this link or you will be banned from the site! Scroll to Top