单项选择题

以下程序的输出结果是______。
main()
int i,j,x=0;
for (i=0;i<2;i++)
x++;
for(j=0;j<3;j++)
if(j%2) continue;
x++;

x++;
printf("x=%d\n",x);

A.x=4
B.x=8
C.x=6
D.x=12
<上一题 目录 下一题>
热门 试题

单项选择题
下列程序语句中,不正确的是______。
A.maia()
float a,b,c;
scanf("%f,%f",&a,&b);
c=add(a,b);
……

int add(float x,float y)
……
B.main()
float a,b,c;
scanf("%f,%f",&a,&b);
c=add(a,b);
……

float add(float x,float y)
……
C.float add()
maia()
float a,b,c;
scanf("%f,%f",&a,&b);
c=add(a,b);
……

float add(float x,float y)
……
D.float add(float x, float y)
……
main()
float a,b,c;
scanf("%f,%f",&a,&b);
c=add(a, b);
……

单项选择题
设x、y、t均为int型变量,执行以下语句后,y的值为______。x=y=3;t=++x||++y;
A.不定值
B.4
C.3
D.1
相关试题
  • 若输入173253,则以下程序的运行结果...
  • 软件工程的结构化生命周期方法,通常是将软...
  • 假定所有变量均已正确说明,以下程序段运行...
  • 以下叙述中,正确的是______。
  • 关于return语句,正确的说法是______...