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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we sort map in c++?

775


How many types of comments are there in c++?

745


Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort

818


What are the advantages of early binding?

813


How do you declare A pointer to a function which receives nothing and returns nothing

933






What is meant by a delegate?

789


Out of fgets() and gets() which function is safe to use?

844


How much do coding jobs pay?

744


What do you understand by pure virtual function? Write about its use?

751


What happens when the extern "c" char func (char*,waste) executes?

828


How const int *ourpointer differs from int const *ourpointer?

794


How is new() different from malloc()?

827


What is the use of bit fields in structure declaration?

721


What is a container class? What are the types of container classes in c++?

858


Difference between pass by value and pass by reference?

817