C++20 sections · 1024 units
Open in CourseQuiz: Virtual Functions
Knowledge check
Check Your Understanding
What happens when you call a virtual function through a base class pointer pointing to a derived object?
- A.The base class version is always called
- B.Compilation error - cannot call virtual functions through pointers
- C.The derived class version is called if it exists
- D.Both versions are called in sequence