Auto storage class:
The location of the auto storage class is memory. The default initial value is garbage value, which is unpredictable. The variable will be alive until the block in which the variable is defined in under the phase of execution. The variable scope is upto to the block in which it is defined.
auto int i;
When it is compiled in the standard turbo c compiler, it will give an garbage value.
Else when it is compiled in online compilers it will the output as zero.
Scope of auto storage class:
The scope of auto storage is up to the block in which it is defined.
the execution starts from the block 3 as it is closed 1st and return 3 to the console, and then it will clears the value 3 from the memory. Then goes to 2nd block and prints 2 and then kills the memory. Then goes to 1st block and prints 1 and then kills the variable and clears the memory allocated to it.