Technical Discussion :: C++
Home > Freshers > Technical Interview Questions > C++
41. List the types of inheritance supported in C++.
Answer:
There are 5 forms available, namely
• Single inheritance: A derived class with only one base class
• Multiple inheritance: A derived class with only several base class
• Hierarchical inheritance: The traits one class may be inherited by more than one class
• Multilevel inheritance:
• Hybrid inheritance: it is a combination of multiple and hierarchical inheritance.
Asked In :: TCS Accenture Sopra Steria
There are 5 forms available, namely
• Single inheritance: A derived class with only one base class
• Multiple inheritance: A derived class with only several base class
• Hierarchical inheritance: The traits one class may be inherited by more than one class
• Multilevel inheritance:
• Hybrid inheritance: it is a combination of multiple and hierarchical inheritance.
• Single inheritance: A derived class with only one base class
• Multiple inheritance: A derived class with only several base class
• Hierarchical inheritance: The traits one class may be inherited by more than one class
• Multilevel inheritance:
• Hybrid inheritance: it is a combination of multiple and hierarchical inheritance.