1.

Which concept will result in derived class with more features (consider maximum 3 classes)?(a) Single inheritance(b) Multiple inheritance(c) Multilevel inheritance(d) Hierarchical inheritanceI have been asked this question in class test.This is a very interesting question from Single Level Inheritance in division Inheritance & its Types of Object Oriented Programming

Answer»

Right choice is (b) Multiple inheritance

The best explanation: If single inheritance is used then only feature of a single class are inherited, and if multilevel inheritance is used, the 2ND class might have use private inheritance. Hence only multiple inheritance can RESULT in derived class with more features. This is not MANDATORY but in a CASE if we CONSIDER same number of features in each class, it will result the same.



Discussion

No Comment Found

Related InterviewSolutions