Examveda

What is the syntax for calling a virtual function from a derived class constructor in C++?

A. virtual_function()

B. Base::virtual_function()

C. this->virtual_function()

D. Derived::virtual_function()

Answer: Option B


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.