LearnFrenzy
Sign in Take a free test

Polymorphism and Virtual Functions · Polymorphism MCQ · Question 5

What does the override keyword do? Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 5 Back to Exercise

What is the purpose of override after a member function declaration?

  • A Makes the function virtual in the base
  • B Makes the compiler check that it really overrides a base virtual function Correct
  • C Prevents further overriding
  • D Makes it faster
Correct Answer: Option B

A signature mismatch (missing const, different parameter type) becomes a compile error instead of silently creating a new function.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links