Important Java Mcq 1

Which one of the following is not a member of the class?

a. Static function

b. Friend function

c. Const function

d. Virtual function

Answer:

d. Virtual function

Explanation:

A virtual function is a member function that you expect to be redefined in derived classes. When you refer to a derived class object using a pointer or a reference to the base class, you can call a virtual function for that object and execute the derived class’s version of the function.

Related MCQs
Aniket Malik

Aniket Malik

CERTIFIED TUTOR/TRAINER WITH 300+ REVIEWS

Facing difficulty with

this concept?