September 2001
Beginner
970 pages
23h 20m
English
You've seen that a variable is characterized by both its type and its storage class. C90 added two more properties: constancy and volatility. These properties are declared with the keywords const and volatile, which create qualified types. The C99 standard adds a third qualifier, restrict, designed to facilitate compiler optimizations.
C99 grants type qualifiers a new property—they now are idempotent! While this sounds like a powerful claim, all it really means is that you can use the same qualifier more than once in a declaration, and the superfluous ones are ignored:
const const const int n = 6; // same as const int n = 6;
This makes it possible, for example, for the following sequence to be accepted:
typedef const ...
Read now
Unlock full access