1.

If all the members of all the base classes are private then _____________(a) There won’t be any use of multiple inheritance(b) It will make those members public(c) Derived class can still access them in multiple inheritance(d) Compile time errorThis question was posed to me in an interview for internship.The question is from Multiple Inheritance in chapter Inheritance & its Types of Object Oriented Programming

Answer»

Right option is (a) There won’t be any use of multiple inheritance

To EXPLAIN: The derived class will not be able to access any members of the base CLASSES. Since PRIVATE MEMBER’s are not inheritable. It leads to no use of multiple inheritance.



Discussion

No Comment Found

Related InterviewSolutions