c语言问题请求解答
int g0=0;
int main(void)
{
int g1=1;
int g2=1;
{
int g2=2;
int g3=2;
g0=2;
g1=2;
}
printf(" g0 =[%d]\n",g0);
printf(" g1 =[%d]\n",g1);
printf(" g2 =[%d]\n",g2);
}
g0,g1,g2分别等于多少?
参考答案:VC输出
g0 =[2]
g1 =[2]
g2 =[1]
int g0=0;
int main(void)
{
int g1=1;
int g2=1;
{
int g2=2;
int g3=2;
g0=2;
g1=2;
}
printf(" g0 =[%d]\n",g0);
printf(" g1 =[%d]\n",g1);
printf(" g2 =[%d]\n",g2);
}
g0,g1,g2分别等于多少?
参考答案:VC输出
g0 =[2]
g1 =[2]
g2 =[1]