What are the five types of inheritance in C++?



What are the five types of inheritance in C++?..

Answer / nashiinformaticssolutions

1. Single inheritance, in which only one base class passes on inheritance to the derived class
2. Multiple inheritance, in which two or more base classes pass on their inheritance to the derived class
3. The derived class inherits from another derived class through multilevel inheritance.

4. Hybrid inheritance, which combines two or more distinct inheritance models
5. Hierarchical inheritance, in which a single base class gives rise to two or more derived classes.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Why is c++ considered difficult?

0 Answers  


Differentiate between the message and method?

1 Answers  


How does a C++ structure differ from a C++ class?

0 Answers   NIIT,


How would you use qsort() function to sort an array of structures?

0 Answers  


What is endl c++?

0 Answers  


What is constant in c++ with example?

0 Answers  


When do we run a shell in the unix system?

0 Answers  


What is null pointer and void pointer and what is their use?

0 Answers  


How many pointers are required to reverse a link list?

5 Answers   CTS,


What are the uses of typedef in a program?

0 Answers  


What are the two types of comments, and how do they differ?

0 Answers  


What are the differences between new and malloc?

0 Answers  


Categories