LearnFrenzy
Sign in Take a free test

Encapsulation · Encapsulation MCQ · Question 10

How do const member functions help encapsulation? Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 10 Back to Exercise

How do const member functions support encapsulation?

  • A They make the class faster
  • B They guarantee an object can be read through a const reference without being modified Correct
  • C They hide data members
  • D They prevent inheritance
Correct Answer: Option B

Functions can then accept const T& parameters, granting read-only access safely.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links