单项选择题
下列不构成无限循环的语句或语句组是( )。
A.n=0; do {++n;} while (n<=0);
B.n=0; while (1) {n++;}
C.n=10; While (; {n--;}
D.for(n=0, i=1; ;i++)n+=i
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有下列程序: #inelude <stdio.h> main() { int x=8; for(;x>0;x--) { if(x%3) {printf( %d, ,x--);continue;} printf( %d, ,--x); } } 程序的运行结果是( )。
A.7,4,2
B.8,7,5,2
C.9,7,6,4
D.8,5,4,2
点击查看答案&解析
单项选择题
若变量已正确定义,有下列程序段: int a=3,b=5,c=7; if(a>B) a=b;c=a; if(c!=A) c=b; printf( %d,%d,%d n ,a,b,C) ; 其输出结果是( )。
A.程序段有语法错
B.3,5,3
C.3,5,5
D.3,5,7
点击查看答案&解析
相关试题
有下列程序: #include <stdio.h> ...
有下列程序: #include <stdio.h> m...
有下列程序: #include <stdio.h> ...
有下列程序: #include <stdio.h> v...
有下列程序: #include <stdio.h> m...