Possible Duplicate:
Does gcc automatically initialize static variables to zero?
Are statically declared objects inside a function guaranteed to be initialized with 0
?
For example:
int func(void)
{
static int x;
...
}
Does the standard promise that x = 0
upon the first invocation of func()
?