有以下程序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-d-e;printf("%d,%d,%d,",d,f,e);}执行后输出结果是
A: 3,4,5,
B: 5,3,4,
C: 5,4,3,
D: 5,-1,3,
A: 3,4,5,
B: 5,3,4,
C: 5,4,3,
D: 5,-1,3,
举一反三
- 有以下程序 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); } 程序运行后的输出结果是()
- 以下是引用片段: int fl(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; printf("%d,%d,%d\n",d,f,e); } 执行后输出结果是
- 下列程序的输出结果是( ) int f1(int x,int y){returnx>y?x ∶ y;} int f2(int x,int y){returnx>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: B: include<;stdio.h>;int main( ){int x , y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;} C: D: include<;stdio.h>;int main( ){int x = 3 ;y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;} E: F: include<;stdio.h>;int main( ){int x = 3 ,y ; printf( "%d\n" , x / y ) ;y = 5; return 0 ;} G: H: include<;stdio.h>;int main( ){int x = 3 , y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;}
- #include [stdio.h] int x,y; int f(int x){ y=x++; printf("%d",y); } int main(void){ int x=5; f(x); f(x); return 0; }