举一反三
- main() {int x=1,a=0,b=0; switch (x) { case 0: b++; case 1: a++; case 2: a++;b++;} printf("a=%d,b=%d",a,b); } 该程序的输出结果是( )
- 请输出以下程序的运行结果()。void main(){ int x=1,a=0,b=0;switch(x){case 0: b++;case 1: a++;case 2: a++;b++;}printf("a=%d,b=%d",a,b);}
- 下列程序段的输出结果是int main(void){ int x = 1,a = 0,b = 0; switch(x) { case 0: b++; case 1: a++ case 2: a++;b++; } printf("a=%d,b=%d\n",a,b); return 0;}
- 有如下程序 #include <stdio.h> void main() { int x=1,a=0,b=0; switch(x) { case 0: b++; case 1: a++; case 2: a++;b++; } printf("a=%d,b=%d\n",a,b); }该程序的输出结果是__
- main() {int x=1,a=0,b=0; switch (x) { case 0: b++; case 1: a++; case 2: a++;b++;} printf("a=%d,b=%d
内容
- 0
04410012:写出下面程序输出结果( )。 int main( ) { int x=1, y=0, a=0, b=0; switch(x) {case 1: switch(y) { case 0: a++; case 1: b++; } case 2: a++; b++; } printf("a=%d, b=%d ", a, b) ; }
- 1
有如下程序 Int main() { int x=1,a=0,b=0; switch(x) { case 0:b++; case 1:a++; case 2:a++;b++; } printf(“a=%d,b=%d\n”,a,b); return 0; } 该程序的输出结果是。
- 2
有如下程序 #include ;void main( ) { int x=1,a=0,b=0; switch(x) { case 0: b++; case 1: a++; case 2: a++;b++; } printf("a=%d,b=%d\n",a,b); }该程序的输出结果是a=2,b=1
- 3
以下程序的运行结果是____。#include <stdio.h>void main(){ int x=1,a=0,b=0;switch(x){ case 0: b++;case 1: a++;case 2: a++;b++;}printf("%d %d",a,b);}
- 4
下列程序段的输出结果是 #include int main( ) { int x=1,a=0,b=0; switch(x) { case 0: b++; case 1: a++; case 2: a++;b++; } printf("a=%d,b=%d\n",a,b); }