All challenges
Multiple ChoiceBeginner 45s

const member function mutability

Inside a `const` member function, which is allowed?
Options
  1. 1Modifying any member, since the const qualifier only affects the type of the implicit this pointer parameter.
  2. 2Calling only non-const member functions of other objects passed in by reference, never const ones.
  3. 3Modifying a member declared `mutable`, but not ordinary data members (they are const-qualified).
  4. 4Taking the address of a data member and binding it to a non-const pointer, provided it is used read-only.

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