网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
有以下程序:#include int f(int x,int y){    return((y-x)*x);}main(){    int a=3,b=4,c=5,d;    d=f(f(a,b),f(a,c));    printf(%d,d);}程序运行后的输出结果是(  )。
A

10

B

9

C

8

D

7


参考答案

参考解析
解析:
主函数中语句d=f(f(a,b),f(a,c));用函数的返回值做参数,所以首先计算f(a,b)代入a=3,b=4,得3,然后计算f(a,c),代入a=3,c=5得6,所以d=f(f(a,b),f(a,c));,即为计算d=f(3,6),值为9。答案选择B选项。
更多 “单选题有以下程序:#include int f(int x,int y){ return((y-x)*x);}main(){ int a=3,b=4,c=5,d; d=f(f(a,b),f(a,c)); printf(%d,d);}程序运行后的输出结果是(  )。A 10B 9C 8D 7” 相关考题
考题 有以下程序#include stdio.hint f(int x){ int y;if(x==0||x==1) return(3);y=x*x-f(x-2);return y;}main( ){int z;z=f(3); printf("%d\n",z);}程序的运行结果是A)0B)9C)6D)8

考题 有以下程序#include stdio.hint f(int x,int y){ return ((y-x)*x);}main(){ int a=3,b=4,c=5,d;d=f(f(a,b),f(a,c));printf("%d\n",d);}程序运行后的输出结果是A)10B)9C)8D)7

考题 (24)有以下程序#includestdio.hint f(int x,int y){return()y-x)*x);}main(){int a=3,b=4,c=5,d;d=f(f(a,b),f(a,c));printf(“%d\n”,d);}程序运行后的输出结果是A)10 B)9 C)8 D)7

考题 有以下程序:includeint f(int x){int y;if(x==0||x==1)return(3);y=x*x-f(x-2);return 有以下程序: #include<stdio.h> int f(int x) {int y; if(x==0||x==1)return(3); y=x*x-f(x-2); return y; } main() {int z; z=f(3);printf("%d\n",z); } 程序的运行结果是( )。A.0B.9C.6D.8

考题 有以下程序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,7D.2,5,7

考题 有以下程序#include stdio.hint f(int x){ int y;if(x==0||x==1) return(3);y=x*x-f(x-2);return y;}main(){ int z;z=f(3); printf("%d\n",z);}程序的运行结果是A.0B.9C.6D.8

考题 有以下程序int fa(int x){return x*x;}int fb(int x){return x*x*x;}int f(int(*fl)(),int(*f2)(),int x}{return f2(x)-f1(x);}main(){int i;i=f(fa,fb,2);printf("%d\n",i);}程序运行后,输出结果是【 】。

考题 若有以下程序: include using namespace std; int f(int x, int y) {return(y-x)*x; 若有以下程序:include <iostream>using namespace std;int f(int x, int y){return (y-x)*x;}int main(){int a=3,b=4,c=5,d;d=f(f(a,b) ,f(a,c) );cout<<d<<<end1;return 0;}执行后的输出结果是【 】。

考题 有以下程序 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),n(c,d));f=f1(f2(a,b),n(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,7D.2,5,7

考题 有以下程序 include define F(X,Y) (X)*(Y) main( ) { int a=3, b=4; prin 有以下程序#include <stdio.h>#define F(X,Y) (X)*(Y)main( ){ int a=3, b=4;printf("%d\n", F(a++, b++));}程序运行后的输出结果是A.12B.15C.16D.20

考题 有以下程序: 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, 7D.2, 5, 7

考题 有以下程序 int fa(int x) { return x*x; } int fb(int x) { return x*x*x; } int f(int (*f1)(),int (*f2)(),int x) { return f2(x)-f1(x); } main() { int i; i-f(fa, fb,2); printf("%d \n",i); } 程序运行后的输出结果是A.4B.1C.4D.8

考题 有以下程序includedefine F(X,Y)(X)*(Y)main(){int a=3,b=4;printf("%d\n",F(a++,b++ 有以下程序 #include<stdio.h> #define F(X,Y)(X)*(Y) main() { int a=3,b=4; printf("%d\n",F(a++,b++)); 程序运行后的输出结果是A.12B.15C.16D.20

考题 有以下程序inc1udeint f(int x,int y){return((y-x)*x);)main(){ int a=3,b=4,c=5,d;d 有以下程序 #inc1ude<stdio.h> int f(int x,int y) { return((y-x)*x);) main() { int a=3,b=4,c=5,d; d=f(f(a,B) ,f(a,C); printf("%d\n",D); } 程序运行后的输出结果是______。A.10B.9C.8D.7

考题 有以下程序:includeint a=2;int f(int *a){return (*a) ++;}main(){ int s=0;{ int a= 有以下程序: #include <stdio.h> int a=2; int f(int *a) { return (*a) ++;} main() { int s=0; { int a=5; s+=f(a); } s+=f(a); printf("%d\n",s) } 执行后的输出结果是( )。A.10B.9C.7D.8

考题 以下程序的输出结果是int f(int x,int y){ return(y-x)*x; }main(){ int a=3,b=4,c=5,d; d=f(f(3,4),f(3,5)); printf("%d\n",d);}

考题 有下列程序: include int f(int x) { int y; if(x=0‖x==1)r 有下列程序: #include <stdio.h> int f(int x) { int y; if(x=0‖x==1)return(3); y=x*x-f(x-2); return y; } main() { int z; z=f(3);printf("%d\n",z); 程序的运行结果是( )。A.0B.9C.6D.8

考题 有以下程序: int fa(int x) { return x*x;) int fb(int x) { return x*x*x;} int f(int (*f1)().int (*f2)(),int x) { return f2(x)-f1(x); } main() { int i; i=f(fa,fb,2);printf("%d\n",i); } 程序运行后的输出结果是( )。A.-4B.1C.4D.8

考题 有以下程序: 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

考题 有以下程序includeint f(intx){inty; if(x==0||x==1)return(3); y=x*x-f(x-2); return 有以下程序 #include <stdio.h> int f(int x) { int y; if(x==0||x==1) return(3); y=x*x-f(x-2); return y; } main() { int z; z=f(3); printf("%d\n",z); } 程序的运行结果是A.0B.9C.6D.8

考题 有以下程序:includedefine F(x,y) (x)*(y)main(){int a=3,b=4; printf("%d\n",F(a++, 有以下程序: #include <stdio.h> #define F(x,y) (x)*(y) main() { int a=3,b=4; printf("%d\n",F(a++,b++)); } 程序运行后的输出结果是( )。A.12B.15C.16D.20

考题 以下程序的输出结果是include "stdio.h"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\n",*p,*q,*r);}

考题 有以下程序: #includestdio.h int f(int x): main {int n=1,m; m=f(f(f(n)));printf("%d\n",m); } int f(int x) {return x*2;) 程序运行后的输出结果是( )。A.1B.2C.4D.8

考题 有以下程序:include define F(X,Y)(X)*(Y)main(){int a=3,b=4;printf("%d\n",F(a++,b 有以下程序: #include <stdio.h> #define F(X,Y)(X)*(Y) main() { int a=3,b=4; printf("%d\n",F(a++,b++)); } 程序运行后的输出结果是( )。A.12B.15C.16D.20

考题 有以下程序:include using namespace std;int f1(int x, int y){ return x>y ? x:y;} 有以下程序: #include <iostream> using namespace std; int f1(int x, int y) { return x>y ? x:y; } int f2(int x, int y) { return x>y? y:x; } int 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<<", "<<e<<", "<<f<<end1; return 0; } 执行后的输出结果是 ( )。A.3,4,5B.5,3,4C.5,4,3D.3,5,4

考题 单选题有以下程序:#include int f(int x); main(){ int n=1,m;  m=f(f(f(n))); printf(%d,m); }int f(int x) { return x*2;} 程序运行后的输出结果是(  )。A 4B 2C 8D 1

考题 单选题有以下程序:#include int f(int x){ int y; if(x==0||x==1)  return (3); y=x*x-f(x-2); return y;}main(){ int z; z=f(3); printf(%d,z);}程序的运行结果是(  )。A 0B 9C 6D 8