以下程序段()。int x=0,y=0,z=0;if (x=y+z)printf(“***”);elseprintf(“###”);
A. 有语法错误,不能通过编译
B. 输出:***
C. 输出:
D. 可以通过编译,但无法输出结果
int 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);return 0;}程序运行后的输出结果是
A. a=0,b=0
B. a=1,b=0
C. a=2,b=1
D. a=3,b=3