1.

Which among the following best defines single level inheritance?(a) A class inheriting a derived class(b) A class inheriting a base class(c) A class inheriting a nested class(d) A class which gets inherited by 2 classesThe question was posed to me by my school teacher while I was bunking the class.Asked question is from Inheritance in portion Inheritance & its Types of Object Oriented Programming

Answer»

Right answer is (b) A class INHERITING a base class

Easiest explanation - A class inheriting a base class DEFINES single level inheritance. Inheriting an already DERIVED class makes it MULTILEVEL inheritance. And if base class is inherited by 2 other classes, it is multiple inheritance.



Discussion

No Comment Found

Related InterviewSolutions