answersLogoWhite

0

Type of inheritances in c plus plus?

Updated: 8/18/2019
User Avatar

Wiki User

10y ago

Best Answer

Single, multiple, multi-level, hierarchical and hybrid/virtual inheritance.

Single inheritance applies when one class inherits from just one base class.

Multiple inheritance applies when one class inherits from two or more base classes.

Multi-level inheritance applies to a class that inherits from at least one base class that is itself derived from another base class.

Hierarchical inheritance applies to a base class that is inherited by two or more separate derived classes.

Hybrid inheritance combines multiple inheritance, multi-level inheritance and hierarchical inheritance. That is, where A is a common base class of derived classes B and C, and B and C are both base classes of derived class D. Hybrid inheritance is often used with virtual inheritance where B and C inherit from A virtually rather than directly. In these cases, the virtual base class is instantiated by the most-derived class in the hierarchy, D, and this instance is then shared by both B and C.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Type of inheritances in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the name of the structure type in C plus plus?

The same as in C, struct.


User defined data type in c plus plus?

Use "typedef" : both in C and C++.


How do you apply if in char type in c plus plus?

char x = "C"; if(char == 'C') { } else { }


What are the features of C plus plus that surpass C?

Object-oriented programming and stricter type-safety.


How unary minus can be overload in c plus plus?

type operator- ();


What is a primitive type variable in c plus plus?

same the types used in C. that is int...char...float...


Can an integer data type in c plus plus stores character value?

no


What use of void data type in c plus plus?

doesn't return the value.


Defference between c plus plus and c?

these are difference in between c and c++: a) C is a SPL and C++ is a OOP. b) C has not concept of object but C++ has this feature. c) C has not 'class' name data type but C++ has.


What is the difference between declaration and a definition in c plus plus?

A declaration is an incomplete type whereas a definition is a complete type.


What is difference between '1' and 1 as for us a computer is concerned with respect to c plus plus?

When you type '1' in a C++ program, it is considered to be of character data type(char). When you type 1, it is considered to be of integer data type.


What type of reaction is shown in this thermochemical equation A plus B plus Heat -- C plus D?

endothermic