Relevant parts of the C99 standard:
section 6.2.4, §3:
An object whose identifier is declared
with external or internal linkage, or
with the storage-class specifier
static has static storage duration.
Its lifetime is the entire execution
of the program and its stored value is
initialized only once, prior to
program startup.
section 6.2.4, §4:
An object whose identifier is declared
with no linkage and without the
storage-class specifier static has
automatic storage duration.
section 6.2.4, §5 (regarding objects with automatic storage duration):
The initial value of the object is
indeterminate. If an initialization is
specified for the object, it is
performed each time the declaration is
reached in the execution of the block;
otherwise, the value becomes
indeterminate each time the
declaration is reached.
section 6.7.8, §10:
If an object that has automatic
storage duration is not initialized
explicitly, its value is
indeterminate. If an object that has
static storage duration is not
initialized explicitly, then:
— if it
has pointer type, it is initialized to
a null pointer;
— if it has arithmetic
type, it is initialized to (positive
or unsigned) zero;
— if it is an
aggregate, every member is initialized
(recursively) according to these
rules;
— if it is a union, the first
named member is initialized
(recursively) according to these
rules.