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

题目内容 (请给出正确答案)

下列程序的输出结果是( )。 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.while循环执行10次

B.循环是无限循环

C.循环体语句一次也不执行

D.循环体语句执行一次


参考答案

更多 “ 下列程序的输出结果是( )。 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.while循环执行10次B.循环是无限循环C.循环体语句一次也不执行D.循环体语句执行一次 ” 相关考题
考题 以下程序执行后的输出结果是( )。include usingnamespacestd;void try(int,int,int,in 以下程序执行后的输出结果是( )。 #include <iostream> using namespace std; void try(int,int,int,int); int main ( ) { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = X*X; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

考题 有如下程序: #includeiostream usingnamespacestd; voidf1(int&X,int&y){intz=x;x=y;y=z;}voidf2(intX,inty){intz=x;x=y;y=z;}intmain(){ intx=10,y=26; f1(x,y); f2(x,y); coutyendl; return0; } 运行时的输出结果是( )。A.10B.16C.26D.36

考题 下列程序段的输出结果是includevoid fun(int * x,int * y){cout 下列程序段的输出结果是 #include<iostream.h> void fun(int * x,int * y) { cout << * X << * y; *X=3; *y=4; } void main() { int x=1,y=2; fun(y,x); cout << X << y<<endl; {A.2143B.1212C.1234D.2112

考题 以下程序执行后的输出结果是include using namespace std;void try(int,int,int,int) 以下程序执行后的输出结果是 #include <iostream> using namespace std; void try(int,int,int,int); int main () { int x,y,z,r; x =1 ; y = 2; try(x,y,z,r); cout<<r<<endl; return 0; } void try(int x,int y,int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

考题 以下程序执行后的输出结果是includeusing namcspace std;void try(int,int,int,int); 以下程序执行后的输出结果是 #include<iostream> using namcspace std; void try(int,int,int,int); int main() { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

考题 有如下程序:#includeiostreamusingnamespacestd;voidf1(int&X,int&y){intz=X;x=y;y=z}voidf2(intX,inty){intz=x;x=y;y=z}intmain( ){intx=10,y=26f1(x,y);f2(X,y);coutyendl;return0;}运行时的输出结果是( )。A.10B.16C.26D.36

考题 下列程序段的输出结果是includevoid fun(int*x,int*y){cout 下列程序段的输出结果是 #include<iostream.h> void fun(int*x,int*y) {cout<<*x<<*y; *X=3; *y=4; } void main() {int x=1,y=2; fun(&y,&x); cout<<X<<y<<endl; }A.2143B.1212C.1234D.2112

考题 以下程序执行后的输出结果是()。includeusing namespace std;void try(int,int,int,in 以下程序执行后的输出结果是( )。 #include<iostream> using namespace std; void try(int,int,int,int); int main() { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<endl; return 0; } void try(int x,int y, int z,int r) { z = x+y; X = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

考题 下列程序段的输出结果是 include void fun(int * X,int * y) {cout 下列程序段的输出结果是 #include<iostream.h> void fun(int * X,int * y) { cout < < * X < < * y; * X=3; * y=4; } void main( ) { int x=1,y=2; fun(y,x); cout < < X < < y < < end1; }A.2143B.1212C.1234D.2112

考题 以下程序执行后的输出结果是include.using namespace std;void try(int,int,int,int) 以下程序执行后的输出结果是 #include<iostream>. using namespace std; void try(int,int,int,int); int main() { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定