Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
A constant expression is an expression in which each of the terms is a constant value. Constant expressions are required in the following situations:
As the value after a case in a switch statement
For specifying the size of an array
For assigning a value to an enumeration identifier
For specifying the bit field size in a structure definition
For assigning initial values to external or static variables
For specifying initial values to global variables
As the expression following the #if in a #if preprocessor statement