Multi Level Inheritance In cpp
Multi Level Inheritance In cpp
PROGRAM:
#include<iostream> using namespace std; class A{ public: A(){ cout<<"\n grand parent"; } }; class B:public A{ public: B(){ cout<<"\n parent1"; } }; class C:public B{ public: C(){ cout<<"\n child"; } }; int main(){ C c; return 0; }
Comments
Post a Comment