Question 71
HardA C++ class has a public member function returning a non-const reference to a private member. What is the effect?
- A.
It doesn't compile
- B.
Nothing; it is still private
- C.
The member becomes const
- D.
Callers can change the private member directly, defeating encapsulation
Sign up free to see the answer and a step-by-step explanation.