Sep
09
#include<iostream.h>
class A{
public:
A(){
cout<<“A() Constructor Called”<<endl;
}
};
class B:public A{
public:
B(){
cout<<“B() Constructor Called”<<endl;
}
};
class C:public B{
public:
C(){
cout<<“C() Constructor Called”<<endl;
}
};
void main(){
C c1;
}
September 17th, 2017 at 8:16 PM
OUTPUT:
A() Constructor Called
B() Constructor Called
c() Constructor Called