educative.io

Shouldn't a mutable pointer be modifiable?

See the attached image for reference.

I expected option D to be correct, but it was marked wrong. Can someone please explain why?


Type your question above this line.

Course: https://www.educative.io/collection/10370001/4779553429389312
Lesson: https://www.educative.io/collection/page/10370001/4779553429389312/5751571217907712

Hi @Okwudili_Pat-Nebe

In this lesson, the author says, “Returning a mutable pointer to a const value is useful. The pointed data cannot be modified, unlike const pointers, it is even taken into account by the compiler.”

Still, if you have any confusion, please feel free to contact us.

Thanks :blush: