All challenges
Multiple ChoiceBeginner 45s

override keyword purpose

What does the `override` specifier do on a member function?
Options
  1. 1It makes the compiler verify the function actually overrides a base virtual, catching signature mismatches at compile time.
  2. 2It makes a non-virtual member function virtual automatically, so it can be overridden in derived classes.
  3. 3It forces dynamic dispatch even when the static type is known, disabling any devirtualization by the compiler.
  4. 4It finalizes the class so it can no longer be derived from, equivalent to writing `final` on the class.

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle