Types of inheritance with suitable examples of each type

Q.4) Explain different types of inheritance with suitable examples of each type.

Ans.


Inheritance is the technique for creating new class (derived classes) from the existing classes (base classes). Derived class inherits the some or all feature of base class.

C++ supports the following type of inheritance.

-Single Inheritance
-Multiple Inheritance
-Hierarchical Inheritance
-Multilevel Inheritance
-Hybrid Inheritance
-Multipath Inheritance





Note: Refer Question number 3, then you will get the idea of other type of inheritance.
Post your comment