求解为什么将int x=10换了位置就得到不同答案
if(x>0)
{
int x = 100;
x /= 2;
printf("if语句内, x=%d\n", x);
}
printf("main方法内, x=%d\n", x);
int x = 10;
fn1();
return 0;
}
if(x>0)
{
int x = 100;
x /= 2;
printf("if语句内, x=%d\n", x);
}
printf("main方法内, x=%d\n", x);
int x = 10;
fn1();
return 0;
}
2018-02-28
举报