Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part III: Appendixes > Constant Expressions

Constant Expressions

A constant expression is an expression in which each of the terms is a constant value. Constant expressions are required in the following situations:

  1. As the value after a case in a switch statement

  2. For specifying the size of an array

  3. For assigning a value to an enumeration identifier

  4. For specifying the bit field size in a structure definition

  5. For assigning initial values to external or static variables

  6. For specifying initial values to global variables

  7. As the expression following the #if in a #if preprocessor statement


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint