有以下程序:#include<stdio.h>main(){intx=1 y=0 a=0 b=0;switch(x){case 1:switch(y){case 0:a+

计算机 程序, 已帮助 人

有以下程序: #include<stdio.h> main() { int x=1,y=0,a=0,b=0; switch(x) { case 1: switch(y) { case 0:a++;break; case 1: b++;break; } case 2:a++;b++;break; case 3:a++;b++; } printf("a=%d,b=%d\n",a,B); } 程序的运行结果是()。

A.a=1,b=0

B.a=2,b=2

C.a=1,b=1

D.a=2,b=1

请帮忙给出正确答案和分析,谢谢!

热搜:一个c程序的执行是从本程序的main函数开始