C++ Program to demonstrate an Example of Multilevel Inheritance

By | January 2, 2017

Example of Multilevel Inheritance


Write a C++ Program to demonstrate an Example of Multilevel Inheritance. Here’s a Simple C++ Program to demonstrate an Example of Multilevel Inheritance in C++ Programming Language.


Multilevel Inheritance


  • It has been discussed so far that a class can be derived from a class.
  • C++ also provides the facility of multilevel inheritance, according to which the derived class can also be derived by an another class, which in turn can further be inherited by another and so on.
  • The following example will illustrate the meaning of the multilevel inheritance:

The class D1 that is called first level of inheritance, inherits the class B. The derived class D1 is further inherited by the class D2, which is called second level of inheritance.


Below is the source code for C++ Program to demonstrate an Example of Multilevel Inheritance which is successfully compiled and run on Windows System to produce desired output as shown below :


SOURCE CODE : :



OUTPUT : :



Above is the source code and output for C++ Program to demonstrate an Example of Multi level Inheritance which is successfully compiled and run on Windows System to produce desired output.

If you found any error or any queries related to the above program or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach upto you in the short interval.


Thanks for reading the post….

Leave a Reply