当前位置: 答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

有以下程序#includemain(){intx=1 y=0 a=0 b=0; switch(x) {case1:switch(y){case0: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 ",a,b); } 程序的运行结果是

A、a=1,b=0

B、a=2,b=2

C、a=1,b=1

D、a=2,b=1

参考答案
您可能感兴趣的试题
  • 有以下程序 include main() {intx=1,y=0,a=0,b=0; switch(x) {case1: switch

  • 有以下程序 include main() {intx=1,y=0,a=0,b=0; switch(x) {case1: switch

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

  • 以下程序的输出结果是 #include voidmain() {intx=1,y=3; cout$amp;<amp;$lt; {intx=0;x+=y*2" />