有如下程序,该程序的输出结果是__________#include<stdio.h>main(){int x=1,a=0,b=0;switch(x){ case 0: ++b;break;case 1: ++a;case 2: a++;b++;}printf(“%d\n”,a);}
举一反三
- 以下程序的运行结果是____。#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);}
- #include <;stdio.h>;int main(){int x=1,a=0,b=0;switch(x){case 0:b++;break;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); }该程序的输出结果是__
- 有如下程序 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; } 该程序的输出结果是。
- 以下程序的运行结果是____。#include <stdio.h>void main(){ int x=1,a=0,b=0;switch(x==0){ case 0: b++;case 1: a++;breakcase 2: a++;b++;}printf("%d %d",a,b);}