Code:
#include<stdio.h>
int main()
{
int i=7;
goto x;
if(1){
static int i=5;
x: printf("%d",i);
}
return 0;
}
Code:
#include<stdio.h>
int main()
{
int i=7;
goto x;
if(1){
int i=5;
x: printf("%d",i);
}
return 0;
}
Code:
#include<stdio.h>
int main()
{
int i=0;
if(1){
int i=5;
x: printf("%d",i);
}
goto x;
return 0;
}
Why garbage value in case 2 while not in case 1 and case 3
and also why the value inside 'if' is getting printed since control of execution never reaches there ??..help !!
( compiler== gcc 4.4.3 )
Comment