Examveda

In C++, can a derived class have more than one base class with a virtual function?

A. Yes

B. No

C. Yes, but only if the virtual functions have the same name.

D. Yes, but only if the virtual functions have different return types.

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.