November 2002
Beginner to intermediate
142 pages
4h 19m
English
The general syntax of a declaration is as follows:
[storage class]type D1[,D2, ...];
storage class
One of the storage class specifiers extern,
static, auto, or
register.
type
A basic type, or one of the following type specifiers:
void, enum type (enumeration),
struct or union type, or
typedef
name.
type may also contain type qualifiers,
such as const.
D1 [, D2,...] A list of declarators. A declarator contains at least one identifier, such as a variable name.
Some examples are:
char letter; int i, j, k; static double rate, price; extern char flag;
Variables can be initialized—that is, assigned an initial value—in the declaration. Variable and function declarations are described in detail in the sections that follow.
Read now
Unlock full access