C++ program to illustrate Multilevel Inheritance


A program to illustrate multilevel inheritance. we have three classes, student, test and result. Here class student is the base class. And the class test is derived from the base class student. And the another class result is derived from the class test.


• Start the process
• Invoke the base class student
• Invoke the derived class test which in inherited by the class student
• Invoke the derived class result which in inherited by the class test
• Create an object student1 for the result class
• Call student1.getno(),assign the value of rno in student class
• Call student1.getmarks(),assign the marks in test class
• Call student1.display(),for displaying the result
• Stop the process


class student
   		int rno;
   		void getno(int);
   		void putno(void);
void student::getno(int a)
void student ::putno()
Editorial Team
Editorial Team

We are a group of young techies trying to provide the best study material for all Electronic and Computer science students. We are publishing Microcontroller projects, Basic Electronics, Digital Electronics, Computer projects and also c/c++, java programs.

13 thoughts on “C++ program to illustrate Multilevel Inheritance

  1. if derived class 2 is inherited privately!!!
    can we make an object of that class (derived class 2) in the MAIN() ?????

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest updates on your inbox

Be the first to receive the latest updates from Codesdoc by signing up to our email subscription.