下列程序的输出结果是()
main()
{
int x=1,a=0,b=0;
switch(x)
{
case0:b++;
case1:a++;
case2:a++;b++;
}
printf(“%d,%d\n",a,b);
}
A.1,0 B.1,1 C.2,1 D.2,2正确答案C
下列程序的输出结果是()
main()
{
int x=1,a=0,b=0;
switch(x)
{
case0:b++;
case1:a++;
case2:a++;b++;
}
printf(“%d,%d\n",a,b);
}
A.1,0 B.1,1 C.2,1 D.2,2正确答案C