Single level Inheritance

When a class inherits from a single base class, it is known as single inheritance. It is the most simple form of inheritance. While inheriting data from base class , derived class may use any one of the visibility modes to specify the data access level. It may public derivation, private derivation or protected derivation. Example: In above code, Class ABC is inheriting data from class XYZ using private derivation. Only one Base class and one Derived class is involved in single level inheritance. Example: Output:

Read More