Lifetime and Scope of variables in C