C++20 sections · 1024 units
Open in CourseQuiz: Method Overriding
Knowledge check
Check Your Understanding
What happens when a derived class defines a function with the same name and signature as a base class function?
- A.Both functions are called in sequence
- B.Compilation error - duplicate function names
- C.The derived class version overrides the base class version
- D.The base class version is called instead