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 can’t you call invariants() as the first line of your constructor?

0 Answers  


How do I use turbo c++?

0 Answers  


What is problem with overriding functions?

0 Answers  


Which of the Standard C++ casts can be used to perform a ?safe? downcast: a) reinterpret_cast b) dynamic_cast c) static_cast d) const_cast

2 Answers   Quark,


Are iterators pointers?

0 Answers  


What is c++ course?

0 Answers  


What is object slicing and how can we prevent it?

2 Answers   Tech Mahindra,


write a program that takes two numbers from user that prints the smallest number

2 Answers  


What is an Iterator class?

1 Answers  


How do I start a c++ project?

0 Answers  


Explain the auto storage classes in c++.

0 Answers  


What is the use of volatile keyword in c++? Give an example.

1 Answers  


Categories