I know that a variable declared static at the beginning of a function will
stick around until the program terminates, e.g.:
void func(void)
{
static foo;
..
}
But does the same apply to variables which are declared static inside a
sub-function block, e.g.
void func(void)
{
while (..) {
static foo;
}
}
I think 'foo' only lasts while the loop is executed, but I am not sure.
I mean, it would be kind of confusing if it were that way..