1.4 Keywords

C defines several keywords, each with special meaning to the compiler. Keywords identify statement constructs and specify basic types and storage classes. Keywords cannot be used as identifiers and cannot be declared.

Table 1-3 lists the C keywords.

Table 1-3 Keywords

auto   double   int   struct  
break   else   long   switch  
case   enum   register   typedef  
char   extern   return   union  
const   float   short   unsigned  
continue   for   signed   void  
default   goto   sizeof   volatile  
do   if   static   while  
__int8 (Alpha)   __int16 (Alpha)   __int32 (Alpha)   __int64 (Alpha)  
__unaligned (Alpha)  __restrict     

Keywords are used as follows:

Use of a keyword as a superfluous macro name is not recommended, but is legal; for example, to change the default size of a basic data type:

#define int short

Here, the keyword int has been redefined as short , which causes all data objects declared with the int data type to be stored as short objects.


Previous Page | Next Page | Table of Contents | Index