Multiple choice

Which of the following statements is/are false?

  1. We cannot create virtual constructor in C++.

  2. We cannot create virtual destructors in C++.

  3. We can define pure virtual destructor also in our program.

  4. Both (2) and (3)

  5. Both (1) and (2)

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

This is not a true statement. There is a necessary condition to make the destructor as virtual as our program can not manage the memory allocated by downward subclasses and it may be leaked.