Loading practice questions
What should be done to prevent changes that may be made to the values pointed by the pointer?
Correct Answer: A — Pointer should be made const
Explanation:
The pointer should be declared as a const type. This prevents the pointer to change any value that is being pointed from it. This is a feature that is made to access the values using pointer but to make sure that pointer doesn’t change those values accidently.