What is a virtual function in C++?
A. Any member function of a class
B. All functions that are derived from the base class
C. All the members that are accessing base class data members
D. All the functions which are declared in the base class and is re-defined/overridden by the derived class
Answer: Option D
Related Questions on Inheritance in C plus plus
A. Multilevel inheritance
B. Hierarchical inheritance
C. Multiple inheritance
D. Single inheritance
A. public
B. private
C. friend
D. protected
What is the process of defining a new class based on an existing class in C++ called?
A. Inheritance
B. Composition
C. Encapsulation
D. Polymorphism

Join The Discussion