Which of the following is not correct for a virtual function in C++?

Which of the following is not correct for a virtual function in C++?

  1. A.

    Virtual functions can be declared in public, protected, or private sections of a class.

  2. B.

    A virtual function can be static.

  3. C.

    Virtual functions can be accessed using pointers or references.

  4. D.

    A virtual function is declared in a base class so derived classes can override it.

Attempted by 240 students.

Sign up free to check your answer

Sign up free

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs

Loading lesson…