Multiple choice

Which of the following statements is/are false about virtual function in C++?

  1. Virtual function is used to achieve dynamic binding in C++.

  2. We cannot instantiate the base class by defining pure virtual function in that class.

  3. We cannot create a virtual function without definition inside the base class.

  4. Both (2) and (3) are false.

  5. None of these

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

This is a false statement about virtual function in C++ as we can create a virtual function without defining the base class, which is known as pure virtual function.