All challenges
Multiple ChoiceHard 45s

const correctness of value params

In a *definition*, marking a by-value parameter `const T p` mainly affects:
Options
  1. 1Nothing at all; marking a by-value parameter const is a compile error in a definition, unlike a declaration.
  2. 2The function body (p can't be reassigned), not overload resolution — it is not part of the signature.
  3. 3Overload resolution only, since the top-level const is part of the signature and selects a different overload.
  4. 4The ABI calling convention for the parameter, because const by-value parameters are passed in read-only registers.

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