State and describe types of inheritance.
Types of inheritance:
o Single Inheritance
o Multiple Inheritance
o Multilevel Inheritance.
o Hierarchical Inheritance
o Hybrid Inheritance
Single Inheritance
o The mechanism of deriving a new class from existing single base class is known as Single Inheritance.
o Syntax:
class A
{
// Class A Body
};
class B: public class A
{
// class B Body;
};