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

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

有以下程序: main( ) 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; printf("%d,%d,%d\n",d,f,e); } 执行后输出的结果是

A.3,4,5

B.5,3,4

C.5,4,3

D.3,5,4


参考答案

更多 “ 有以下程序: main( ) 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; printf("%d,%d,%d\n",d,f,e); } 执行后输出的结果是A.3,4,5B.5,3,4C.5,4,3D.3,5,4 ” 相关考题
考题 以下程序执行后的输出结果是( )。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.不确定

考题 主调函数中的两个变量a和b,要求调用函数交换a、b的值,返回交换结果,则以下正确的函数是______。A.funa(int*x,int*y) {int*p; *p=*x;*x=*y;*y=*p; }B.funb(int x,int y) {int t; t=x;x:y=y=t;}C.func(int*x,int*y) {*x=*y;*y=*x;}D.fund(int *x,int*y) {*x=*x+*y;*y=*x-*y;*x=*x-*y;}

考题 主调函数中的两个变量a和b,要求调用函数交换a、b值,返回交换结果,则以下正确的函数是______。A.funa(int*x,int*y) { int*p; *p=*x;*x=*y;*y=*p; }B.funb (int x,int y) {int t;t=x;x=y;y=t;}C.func(int *x,int*y) {*X=*y;*y=*x;}D.fund(int *x,int *y) {*x=*x+*y;*y=*x-*y;*x=*x-*y;}

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

考题 以下程序的输出结果是#include "stdio.h"int *fun(int *a,int *b){ int m; m=*a; m+=*b-3; return(m);}main(){ int x=21,y=35,*a=x,*b=y; int *k; k=fun(a,b); printf("%d\n",*k);}

考题 以下程序执行后的输出结果是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.不确定

考题 以下程序执行后的输出结果是()。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.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.不确定

考题 下面能正确使用的语句是().A.int*x;y=1;x=y;B.int*x;y;x=y;C.int*x;*x=1;D.int*x,y=1;x=y;