Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What does the const qualifier on a member function declare?

  1. A The return value cannot be modified
  2. B The function does not modify the object's observable state and can be called on const objects
  3. C The function cannot be overridden
  4. D The parameters are constant
Answer

The function does not modify the object's observable state and can be called on const objects

Omitting const on a non-mutating method is the most common const-correctness failure, because callers holding a const reference cannot then use it.

All C++ MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as