Multiple choice technology programming languages

If you declare an object as constant, then every member of the object would be?

  1. variable

  2. same as if in noraml object

  3. constant

  4. none

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In C++, when an object is declared as const, all its members become const. This means you can only call const member functions on the object and cannot modify any member variables. The const qualifier applies to the entire object state.