Sun Studio 12: C User's Guide

6.6.3 const Means readonly

In hindsight, readonly would have been a better choice for a keyword than const. If one reads const in this manner, declarations such as:


char *strcpy(char *, const char *);

are easily understood to mean that the second parameter is only used to read character values, while the first parameter overwrites the characters to which it points. Furthermore, despite the fact that in the above example, the type of cpi is a pointer to a const int, you can still change the value of the object to which it points through some other means, unless it actually points to an object declared with const int type.