|
Inheritance in C++ Interview Questions & Answers
Below we have listed all the Inheritance in C++ Interview Questions and answers. Feel free to comment on any Inheritance in C++ Interview Questions or answer by the comment feature available on the page.
To buy an eBook containing 30,000 Interview Questions, with Answers, Click Here.
View All Inheritance in C++ Interview Questions & Answers - Exam Mode /
Learning Mode
|
An existing class that is "parent" of a new class is called a base class. New class that inherits properties of the base class is called a derived class. Inheritance is a technique of code reuse. It also provides possibility to extend existing classes by creating derived classes.
In C++, we have 5 different types of Inheritance. Namely,
Single Inheritance
Multiple Inheritance
Hierarchical Inheritance
Multilevel Inheritance
Hybrid Inheritance (also known as Virtual Inheritance).
|
|