int array1[10];
The next example declares array2 to be a two-dimensional (2 by 3) array of integers:
int array2[2][3];
The elements are stored in row-major order as follows:
array2[0][0], array2[0][1], ... array2[1][2].
enum { enumerator,... } or enum tag { enumerator,... } or enum tag
Each enumerator defines a constant of the enumerated type (tag). The enumerator list forms an ordered list of the type's values. Each enumerator has the form "identifier [= expression]", where the "identifier" is the name to be used for the constant value and the optional "expression" gives its integer equivalent. If a tag appears but no list of enumerators, the enum-specifier refers to a previous definition of the enumerated type, identified by the tag.
int i, *ip, *np; /* i IS AN INTEGER, ip AND np ARE POINTERS TO INTEGERS */
The following operations are permitted on pointers:
o Assigning an address to the pointer (as in ip = &i;)
o Fetching the object of the pointer (by dereferencing the pointer) with the asterisk operator (i = *ip;, which assigns the addressed integer to i)
o Adding (as in ip += 5;, which makes ip point to the object that is five longwords away from the initial address in ip)
o Subtracting (as in i = np - ip;, which gives the number of objects separating the objects pointed to by np and ip)
struct [identifier] { struct-declaration ... }
Each struct-declaration is a type specifier (type keyword, struct tag, union tag, enum tag, or typedef name) followed by a list of member declarators. The syntax is as follows:
type-specifier member-declarator,... ;
Each member declarator defines either an ordinary variable or a bit field. The syntax is as follows:
declarator or [declarator] : constant-expression
typedef char CH, *CP, STRING[10], CF();
In the scope of this declaration, CH is a synonym for "character," CP for "pointer to character," STRING for "10-element array of characters," and CF for "function returning a character." Each of the type definitions can be used in that scope to declare variables. For example:
CF c; /* c IS A FUNCTION RETURNING A CHARACTER */ STRING s; /* s IS A 10-CHARACTER STRING */
union [identifier] { union-declaration ... }
Each union-declaration is a type specifier (type keyword, struct tag, union tag, enum tag, or typedef name) followed by a list of member declarators. The syntax is as follows:
type-specifier member-declarator,... ;
Each member declarator defines either an ordinary variable or a bit field. The syntax is as follows:
declarator or [declarator] : constant-expression