What should be done to prevent changes that may be made to the values pointed by the pointer?
(a) Usual pointer can’t change the values pointed
(b) Pointer should be made virtual
(c) Pointer should be made anonymous
(d) Pointer should be made const
I have been asked this question by my school principal while I was bunking the class.
Query is from Pointer to Objects in division Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming