+ 1
Any one knows?
what is the scope rule for nested blocks?
3 Respuestas
+ 6
sayed sayed Scope rule of Nested Blocks : if an identifier is declared as a variable in each of two blocks, one within the other, then these are two different variables with the same name.
One variable exists only within the inner block and cannot be accessed outside
the inner block. The other variable exists only in the outer block and cannot
be accessed in the inner block.
+ 2
in general, automatic variables has scope of the block it is contained in
0
The variable declared inside a scope is local to a scope .. it lasts from it's place of declaration to the end of the scope