Multiple choice

Which of the following keywords is used in C++ when two or more objects are derived from a common base class and to prevent multiple copies of the base class being present in an object derived from other derived classes?

  1. void

  2. break

  3. exit

  4. virtual

  5. continue

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

This keyword is used in C++ when two or more objects are derived from a common base class and to prevent multiple copies of the base class being present in an object derived from other derived classes.