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.

Answer: B. VirtualA virtual function is declared in a base class using the virtual keyword to enable polymorphism. This allows derived classes to override the function,…

  1. A.

    Friend

  2. B.

    Virtual

  3. C.

    Private

  4. D.

    Protected

Attempted by 428 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: Rssb Senior Computer Instructor

Loading lesson…