1.

How many classes can be inherited by a single class in multiple inheritance (C++)?(a) Only 2(b) Only 27(c) Only 1024(d) Any number of classes can be inheritedThe question was asked at a job interview.My doubt stems from Types of Inheritance topic in chapter Inheritance & its Types of Object Oriented Programming

Answer»

Right answer is (d) Any NUMBER of CLASSES can be inherited

The best EXPLANATION: Any class can inherit any number of classes. There is no LIMIT defined for the number of classes being inherited by a single class.



Discussion

No Comment Found

Related InterviewSolutions