Table 1-2 lists the 32 keywords that, combined with the formal C syntax, form the C
programming language. Of these, 27 were defined by the original version of C. These
five were added by the ANSI C committee: enum, const, signed, void, and volatile.
All are, of course, part of the C++ language.
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
programming language. Of these, 27 were defined by the original version of C. These
five were added by the ANSI C committee: enum, const, signed, void, and volatile.
All are, of course, part of the C++ language.
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
Table 1-2. The 32 Keywords Defined by Standard C
In addition, many compilers have added several keywords that better exploit their
operating environment. For example, several compilers include keywords to manage
the memory organization of the 8086 family of processors, to support inter-language
programming, and to access interrupts. Here is a list of some commonly used extended
keywords:
asm _cs _ds _es
_ss cdecl far huge
interrupt near pascal
Your compiler may also support other extensions that help it take better advantage
of its specific environment.
All C (and C++) keywords are lowercase. Also, uppercase and lowercase are
different: else is a keyword; ELSE is not. You may not use a keyword for any other
purpose in a program—that is, you may not use it as a variable or function name.
All C programs consist of one or more functions. The only function that must be
present is called main() , which is the first function called when program execution
begins. In well-written C code, main() contains what is, in essence, an outline of what
the program does. The outline is composed of function calls. Although main() is not
a keyword, treat it as if it were. For example, don't try to use main() as the name of a
variable because you will probably confuse the compiler.
The general form of a C program is illustrated in Figure 1-1, where f1() through
fN() represent user-defined functions.
operating environment. For example, several compilers include keywords to manage
the memory organization of the 8086 family of processors, to support inter-language
programming, and to access interrupts. Here is a list of some commonly used extended
keywords:
asm _cs _ds _es
_ss cdecl far huge
interrupt near pascal
Your compiler may also support other extensions that help it take better advantage
of its specific environment.
All C (and C++) keywords are lowercase. Also, uppercase and lowercase are
different: else is a keyword; ELSE is not. You may not use a keyword for any other
purpose in a program—that is, you may not use it as a variable or function name.
All C programs consist of one or more functions. The only function that must be
present is called main() , which is the first function called when program execution
begins. In well-written C code, main() contains what is, in essence, an outline of what
the program does. The outline is composed of function calls. Although main() is not
a keyword, treat it as if it were. For example, don't try to use main() as the name of a
variable because you will probably confuse the compiler.
The general form of a C program is illustrated in Figure 1-1, where f1() through
fN() represent user-defined functions.
No comments:
Post a Comment