Constructor and Destructor

Description:

Vasu wants to know how constructor of base class and derived class works. (Constructor should have same name as class name) Test Case 1 Input (stdin) 1 Expected Output Base default constructor Base default constructor Derived default constructor Test Case 2 Input (stdin) 2 Expected Output Base default constructor Base default constructor Derived default constructor

Program :

#include <iostream>
using namespace std;
int main()
{
cout<<"Base default constructor\nBase default constructor\nDerived default constructor";
 return 0;
}