Hybrid Inheritance In C++

Card image cap

Hybrid Inheritance ?

Basically C++ hybrid inheritance is combination of two or more types of inheritance. Which means hybrid inheritance is implemented by combining more than one type of inheritance.
For example:
Combining Hierarchical inheritance and Multiple Inheritance..

Card image cap

The inheritance in which the derivation of a class involves more than one form of any inheritance is called hybrid inheritance.

Syntax:

Card image cap

Example 1:



Output :

x: 11
Sum= 14
Card image cap