Constructor and Destructor Calling in C++

In a C++ programming language constructor are called from base class to derived class and destructor are called reverse of constructor means from derived class to base class.                                                                                                                      

Example:   Write a program to show the sequence of execution of constructor and destructor.

Output