1.

Which problem arises due to multiple inheritance, if hierarchical inheritance is used previously for its base classes?(a) Diamond(b) Circle(c) Triangle(d) LoopI had been asked this question in quiz.I need to ask this question from Multiple Inheritance topic in chapter Inheritance & its Types of Object Oriented Programming

Answer»

Right option is (a) Diamond

The explanation is: The diamond problem arises when multiple INHERITANCE is used. This problem arises because the same name MEMBER functions get derived into a SINGLE CLASS. Which in turn creates AMBIGUITY in calling those methods.



Discussion

No Comment Found

Related InterviewSolutions