C++20 sections · 1024 units
Open in Course

Quiz: 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?

  1. A.The base class version is always called
  2. B.Compilation error - cannot call virtual functions through pointers
  3. C.The derived class version is called if it exists
  4. D.Both versions are called in sequence
Start the roadmap to answer the quizzes and solve the challenges