Quiz on C++ Virtual Function



1. What is a virtual function in C++?
2. What keyword is used to declare a virtual function?
3. What will happen if a base class pointer points to a derived class object and a virtual function is called?
4. Can a virtual function be static?
5. What is the purpose of the 'override' keyword in C++11?

Advertisements