Multiple choice

Why is there a need for virtual base class in hybrid/diamond inheritance? Multiple inheritance: more than one class is derived from single base class. Multilevel inheritance: single class is derived from many base classes.

  1. To avoid ambiguity

  2. For reusability

  3. For faster processing

  4. None of the above

  5. All 1, 2 and 3

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

Virtual base class is used to reduce ambiguity, it cannot be used for faster processing and reusability.