A ________ function is a member function in base class that you expect to…

2018

A ________ function is a member function in base class that you expect to redefine in derived classes.

  1. A.

    Friend

  2. B.

    Virtual

  3. C.

    Private

  4. D.

    Protected

Attempted by 120 students.

Show answer & explanation

Correct answer: B

A virtual function is declared in a base class using the virtual keyword to enable polymorphism. This allows derived classes to override the function, ensuring the correct implementation is called at runtime based on the object type.

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs