Question OOP-ENC-0076
HardWhat does the C++ 'mutable' keyword allow, and when is it acceptable?
- A.
Making a member const
- B.
Changing access levels
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Encapsulation question
What does the C++ 'mutable' keyword allow, and when is it acceptable?
Making a member const
Changing access levels
Sign up free to see the answer and a step-by-step explanation.
Changing a member inside a const method; acceptable for caches or counters that don't affect the object's logical state
Making a class abstract