#include <stdio.h>
int main()
{
int a = 10;
goto inside;
{
int a = 20;
{
inside:
printf("%d",a);
}
}
}
Why does it print output as 0, not as 10? Even if it looks for nearest scope ie. int a = 20 which is not executed clearly. The memory contains only int a = 10; so why 0 here?