2011/06/25

C Const and Pointers

To create a pointer which says it won't modified the value it points to:
const int *a;
Thus, reassigning to a is allowed, but reassigned to the integer pointed by a is not permitted.

To  create a pointer which itself is a constant:
int *const b;
Thus, reassigning to b is not allowed, but reassigned to the integer pointed by b is permitted.