1.

How many classes can be derived from the base class using hierarchical inheritance?(a) As many as required(b) Only 7(c) Only 3(d) Up to 127This question was addressed to me in exam.I would like to ask this question from Hierarchical Inheritance in section Inheritance & its Types of Object Oriented Programming

Answer»

Right choice is (a) As many as REQUIRED

The best explanation: The number of classes that can be DERIVED from a base class doesn’t have any restriction and HENCE will be able to derive as many classes as required. This FEATURE GIVES more flexibility and code reusability.



Discussion

No Comment Found

Related InterviewSolutions