设有声明int a=1,b=0;则执行以下语句后的输出结果为______ switch(a){ case 1: switch(b) { case 0:printf("**0**");break; case 1:printf("**1**");break; }break; case 2:printf("**2**");break;}
举一反三
- 下列程序的输出结果是_____________ main() { int a=1,b=0; switch(a) { case 1: switch (b) { case 0: printf("**0**"); break; case 1: printf("**1**"); break; } case 2: printf("**2**"); break; } }
- 中国大学MOOC: 如下代码片段的输出是什么? int a = 1, b = 0; switch (a) { case 1: switch (b) { case 0: printf (**0**); break; case 1: printf (**1**); break; } case 2: printf (**2**); break; }
- 中国大学MOOC: 以下程序输出的结果是()# include <stdio.h>int main(){ int a = 4; switch(a ) { case 0: printf("this is 0\n"); break; case 1: printf("this is 1\n"); break; case 2: printf("this is 2\n"); break; default: printf("this is default\n"); } return 0;
- 中国大学MOOC: 读下列程序:void 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; } printf(
- 中国大学MOOC: 设有声明语句:int a=1,b=0;则执行以下语句后输出结果为()switch(a){case1:switch(b){case0:printf("**0**");break;case1:printf("**1**");break;}case2:printf("**2**");break;}