1.

How many abstract classes can be used in multilevel inheritance?(a) Only 1(b) Only 2(c) At least one less than number of levels(d) Can’t be usedI have been asked this question during an online interview.My question is based upon Multilevel Inheritance in chapter Inheritance & its Types of Object Oriented Programming

Answer»

The correct ANSWER is (c) At least one LESS than number of levels

Easiest explanation - At least one CLASS must implement all the UNDEFINED functions. Hence there must be at least one class which is not abstract. That is at least one less than number of levels.



Discussion

No Comment Found

Related InterviewSolutions