← Quiz: Inheritance and Virtual Functions: all 10 questions
Quiz: Inheritance and Virtual Functions · Question 5 of 10
What does the override keyword do?
What does the override keyword do?
- A.Makes a function virtual in the base
- B.Makes the compiler check that the function really overrides a base virtual function
- C.Hides the base class
- D.Deletes the base function
Answer & explanation
Correct answer: Makes the compiler check that the function really overrides a base virtual function
It catches mistakes like a misspelled name or wrong parameters.
Can you get the rest right without peeking?
Take the timed Quiz: Inheritance and Virtual Functions quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →