下面程序的运行结果是()。#includeintmain(){inti;for(i=0;i<10;i++);printf(“%d”,i);return0;}
举一反三
- 下面程序执行后的输出结果是()。#includeintmain(){inti=0,s=0;for(;;){if(i==3||i==5)continue;if(i==6)break;i++;s+=i;};printf("%d",s);return0;}#includeintmain(){inti=0,s=0;for(;;){if(i==3||i==5)continue;if(i==6)break;i++;s+=i;};printf("%d",s);return0;}#includeintmain(){inti=0,s=0;for(;;){if(i==3||i==5)continue;if(i==6)break;i++;s+=i;};printf("%d",s);return0;}#includeintmain(){inti=0,s=0;for(;;){if(i==3||i==5)continue;if(i==6)break;i++;s+=i;};printf("%d",s);return0;} A: 10 B: 13 C: 21 D: 死循环
- 中国大学MOOC:程序运行后的输出结果是#includeintmain(){inti;for(i=0;i<3;i++)switch(i){case0:printf("%d",i);case2:printf("%d",i);default:printf("%d",i);}return0;}
- 运行下面程序段的输出结果是()。inti;for(i=0;i<10;i++);printf("%d",i);
- 以下程序段的运行结果是______。#includeintmain(){inti=0;doprintf("%d,",i);while(i++);printf("%d",i);}
- 以下程序运行后的输出结果是#includeintmain(){inti=0,s=0;for(;;){if(i==3||i==5)continue;if(i==6)break;i++;s+=i;}printf("%d",s);return0;} A: 程序进入死循环 B: 10 C: 13 D: 21