1.

If class A and class B are derived from class C and class D, then ________________(a) Those are 2 pairs of single inheritance(b) That is multilevel inheritance(c) Those is enclosing class(d) Those are all independent classesThis question was posed to me in an international level competition.My question is from Single Level Inheritance in section Inheritance & its Types of Object Oriented Programming

Answer»

Correct answer is (a) Those are 2 PAIRS of single INHERITANCE

Explanation: Since class A is DERIVED from class C and then class B is derived from class D, there are two pairs of classes which shows single inheritance. Those two pairs are INDEPENDENT of each other though.



Discussion

No Comment Found

Related InterviewSolutions