I think you need to study some more C before giving advice.
value pointed by ptr is constant.
ptr can be changed.
Just the other way arround. Here ptr is a constant pointer to a char,
which means that the char it points to can be changed, but ptr itself
cannot be changed.
value pointed by ptr can change.
ptr itself can't change.
Again, the other way arround. Here ptr is a pointer to a constant char,
which means that ptr can be changed but you cannot change the char it
points to through this variable.
neither ptr, nor the value pointed by ptr can change.
Completely wrong. Here ptr is a pointer to a constant pointer to a
char. This means that ptr can be changed. The pointer it points to
cannot be changed, but the char pointed by the pointer pointed to by
ptr can be changed.
Yes, see above.
By the way, did you try looking it up in some book before posting it
here?
Did you try to looking it up before posting advice that was incorrect?