10
9
8
7
第1题:
有以下程序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,7
B.3,4,7
C.5,2,7
D.2,5,7
第2题:
有以下程序
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);}
程序运行后,输出结果是【 】。
第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),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,7
B.3,4,7
C.5,2,7
D.2,5,7
第4题:
有以下程序: 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, 7
B.3, 4, 7
C.5, 2, 7
D.2, 5, 7
第5题:
有以下程序 #include<stdio.h> #define F(X,Y)(X)*(Y) main() { int a=3,b=4; printf("%d\n",F(a++,b++)); 程序运行后的输出结果是
A.12
B.15
C.16
D.20
第6题:
有以下程序: #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.10
B.9
C.7
D.8
第7题:
有下列程序: #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.0
B.9
C.6
D.8
第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,5
B.5,3,4
C.5,4,3
D.3,5,4
第9题:
有以下程序: #include <stdio.h> #define F(x,y) (x)*(y) main() { int a=3,b=4; printf("%d\n",F(a++,b++)); } 程序运行后的输出结果是( )。
A.12
B.15
C.16
D.20
第10题:
有以下程序: #include<stdio.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.1
B.2
C.4
D.8
第11题:
有以下程序: #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,5
B.5,3,4
C.5,4,3
D.3,5,4
第12题:
0
9
6
8
第13题:
有以下程序
#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.0
B.9
C.6
D.8
第14题:
若有以下程序:
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;
}
执行后的输出结果是【 】。
第15题:
有以下程序
#include <stdio.h>
#define F(X,Y) (X)*(Y)
main( )
{ int a=3, b=4;
printf("%d\n", F(a++, b++));
}
程序运行后的输出结果是
A.12
B.15
C.16
D.20
第16题:
有以下程序 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.4
B.1
C.4
D.8
第17题:
有以下程序 #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.10
B.9
C.8
D.7
第18题:
以下程序的输出结果是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);}
第19题:
有以下程序: 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.-4
B.1
C.4
D.8
第20题:
有以下程序 #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.0
B.9
C.6
D.8
第21题:
以下程序的输出结果是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);}
第22题:
有以下程序: #include <stdio.h> #define F(X,Y)(X)*(Y) main() { int a=3,b=4; printf("%d\n",F(a++,b++)); } 程序运行后的输出结果是( )。
A.12
B.15
C.16
D.20
第23题:
4
2
8
1