Multilevel Inheritance:-In the Multilevel Inheritance there is one base class and other class which is derived from this base class is called derived class. The process of deriving a class from another derived class.
class A
{
A()
{
Cout<<”I m in A”;
}
};
Class B:public A
{
B()
{
Cout<<”I m in B”;
}
};
class C:public B
{
C()
{
Cout<<”I m in C”;
}
};
Class D:public C
{
D()
{
Cout<<”I m in D”;
}
};
Void main()
{
D d;
}
Output:-I m in A
I m in B
I m in C
I m in D