Examveda

What is the use of the 'virtual' keyword in C++?

A. It indicates that a function can be overridden in derived classes.

B. It indicates that a function cannot be overridden in derived classes.

C. It indicates that a function must be called in the derived class.

D. It indicates that a function can be called from anywhere.

Answer: Option A


Join The Discussion

Related Questions on Polymorphism in C plus plus

What is polymorphism in C++?

A. A feature that allows objects of different classes to have the same name.

B. A feature that allows functions to perform different tasks based on the object they are called with.

C. A feature that allows the same function to have different implementations.

D. A feature that allows inheritance of multiple classes.