Question 33

Which one of the following most accurately describes "multiple inheritance" ?

  1. AWhen a child class has both an "is a" and a "has a" relationship with its parent class.
  2. BWhen two classes inherit from each other.
  3. CWhen a base class has two or more derived classes.
  4. DWhen a child class has two or more parent classes.
Show answerHide answer

Correct answer: (D) When a child class has two or more parent classes.

Explanation

Multiple inheritance means one derived (child) class inherits from two or more base (parent) classes.

From DSSSB TGT Computer Science Practice Set 2

This is question 33 of DSSSB TGT Computer Science Practice Set 2. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.