[单选题]

有以下程序:includemain(){int x=8;for(;x>0;x£­£­){if(x%3){printf("%d,",x£­£­);continu

有以下程序: #include<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 f1(int x, int y){return x>y? x:

[单选题]有以下程序int f1(int x, int y){ return x>y? x:y;}int f2(int x, int y){ return x>y? y:x;}main(){ int a=4,b=3,c=5,d,e,f; d=f1(a,B) ;d=f1(d,C) ; e=f2(a,B) ;e=f2(e,C) ; f=a+b+c-d-e; cout<<d<<", "<<f<<", "<<e<<end1;}执行后输出结果是A.3,4,5B.5,3,4C.5,4,3D.3,5,4

  • 查看答案
  • 有以下程序:int f1(int x,int y) {return x>y?x:

    [单选题]有以下程序: int f1(int x,int y) { return x>y?x:y; } int f2(int x,int y) { return x>y?y:x; } main() { int a=4,b=3,c=5,d,e,f; d=fl(a,b);d=f1(d,c); e=f2(a,b);e=f2(e,c); f=a+b+c-d-e; printf("%d,%d,%d/n",d,f,e); } 执行后输出结果是( )。A.3,4,5B.5,3,4C.5,4,3D.3,5,4

  • 查看答案
  • 有以下程序:int f1(int x, int y){return x>y?x:

    [单选题]有以下程序: int f1(int x, int y){ return x>y? x:y; } int f2(int x, int y){ return x>y? y:x; } main() { int a=4, b=3, c=5, d=2, e, f, g; e=f2(f1(a, b), f1(c, d)); f=f1(f2(a, b) , f2(c, d)); g=a+b+c+d-e-f; printf("% d, %d, %d/n", e, f, g); } 程序运行后的输出结果是__

  • 查看答案
  • 有以下程序A:int f1(int x,int y){return x>y?x:

    [单选题]有以下程序A: int f1(int x,int y) { return x>y?x:y; } int f2(int x,int y) { return x>y?y:x; ) main() { int a=4,b=3,c=5,d=2,e,f,g; e=f2(f1(a,B),f1(c,D));f=f1(f2(a,B),f2(c,D)); g=a+b+c+d-e-f; printf("%d,%d,%d/n",e,f,g); } 程序运行后的输出结果是( )。A.4,3,7B.3,4,7C.5,2

  • 查看答案
  • 有以下程序 int f1(int x,int y) {return x>y? x

    [单选题]有以下程序int f1(int x,int y){ return x>y? x:y;}int f2(int x,int y){ return x>y? y:x;}main( ){ int a=4,b=3,c=5,d,e,f;d=f1(a,b);d=f1(d,c);e=f2(a,b);e=f2(e,c);f=a+b+c-d-e;cout<<d<<","<<f<<","<<e<<endl;}执行后输出结果是A.3,4,5B.5,3,4C.5,4,3D.3,5,4

  • 查看答案
  • 有以下程序 int f1 (int x,inty){return x>y?x:y

    [单选题]有以下程序 int f1 (int x,inty){return x>y?x:y;} int f2(int x,int y){return x>y?y:x;} main() { int a=4,b=3,c=5,d=2,e,f,g; e=f2(f1(a,b),f1(c,d));f=f1(f2(a,b),f2(c,d)); g=a+b+c+d-e-f; pintf("%d,%d,%d/n",e,f,g); } 程序运行后的输出结果是 ______。A.4,3,7B.3,4,7C.52,7D.2,

  • 查看答案
  • 以下for循环的执行次数是()。for(int x=0;(x==0) & (x>

    [单选题]以下for循环的执行次数是( )。 for(int x=0; (x==0) & (x>4);x++);A.无限次B.一次也不执行C.执行4次D.执行3次

  • 查看答案
  • 以下for循环的执行次数是()for(int x=0,(x==0)&(x>4);

    [单选题]以下for循环的执行次数是 ( )for(int x=0,(x==0)&(x>4);x++);A.无限次B.一次也不执行C.执行4次D.执行3次

  • 查看答案
  • 有以下程序:#includemain(){int a=1,b=2,c=3,x;x

    [单选题]有以下程序:includemain(){int a=1,b=2,c=3,x;x=(a^B)&c;printf("%d/n",x);}程序的运有以下程序: #include<stdio.h> main() { int a=1,b=2,c=3,x; x=(a^B)&c;printf("%d/n",x); } 程序的运行结果是( )。A.0B.1C.2D.3

  • 查看答案
  • int*f(int*x,int*y) { if(*x>*y) return x;

    [单选题]int*f(int*x,int*y) { if(*x>*y) return x; else return y; } main() { int a=7,b=8,*p,*q,*r; p=&a;q=&b;r=f(p,q); printf("%d,%d,%d",*p,*q,*r); }执行后输出结果是______。A.7,8,8B.7,8,7C.8,7,7D.8,7,8

  • 查看答案
  • 有以下程序:#includemain(){int x=8;for(;x>0;x£