1.

How many types of inheritance are possible in C++?(a) 2(b) 3(c) 4(d) 5This question was posed to me in a job interview.Asked question is from Types of Inheritance topic in section Inheritance & its Types of Object Oriented Programming

Answer»

The correct option is (d) 5

To explain I would say: There are five types of INHERITANCE that are possible in C++. Single LEVEL, Multilevel, multiple, hierarchical and hybrid. Here we count hybrid also because it sometimes can bring up a new form of inheritance, Like inheritance USING multiple and hierarchical, which sometimes RESULTS in diamond problem.



Discussion

No Comment Found

Related InterviewSolutions