单项选择题

有以下程序: main() { int a=1,b; for(b=1;b<=10;b++) { if(a>=8)break; if(a%2==1){a+=5;continue;} a-=3; } printf("%d\n",b); } 程序运行后的输出结果是______。

A.3
B.4
C.5
D.6
<上一题 目录 下一题>
热门 试题

单项选择题
以下选项中不能正确把c1定义成结构体变量的是( )。
A.typedef struct   { int red;    int green;    int blue;   } COLOR;      COLOR cl;
B.struct color cl   { int red;   int green;    int blue;   }
C.struct color   { int red;   int green;   int blue;   } cl;
D.struct   { int red;    int green;    int blue;   } cl;
单项选择题
有以下程序段:int n,t=1,s=0;scanf( %d ,&n);do{ s=s+t; t=t-2; }while (t!=n); 为使此程序段不陷入死循环,从键盘输入的数据应该是______。
A.任意正奇数
B.任意负偶数
C.任意正偶数
D.任意负奇数
相关试题
  • 有以下程序:void swap1(int c[ ])...
  • 下面程序的功能是输出以下形式的金字塔图案...
  • 有以下程序:void swap1(int c0[],...
  • 有以下程序:int f(int b[ ][4])...
  • 以下程序中函数scmp的功能是返回形参指针s...