Multilevel Inheritance In C++

Card image cap

Multilevel Inheritance ?

In Multilevel inheritance, there is one base class and another class which is derived from this base class is called derived class.

Card image cap

As shown in above block diagram, class C has class B and class A as parent classes. Depending on the relation the level of inheritance can be extended to any level.


Card image cap

Example 1:

Output :

 x: 11
Total Objects: 1
Value of a: 10
Value of b: 20
Value of c: 30
Card image cap