What is a virtual function in C++?
18 views
- A function that can be called from another function
- A function that can be overridden in a derived class (Correct Answer)
- A function that is automatically called when an object is created
- None of the above
Explanation
Answer: B
Explanation: A virtual function is a function that can be overridden in a derived class