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

题目内容 (请给出正确答案)
单选题
有以下程序 void f(int x,int y) { int t; if(x < y) { t=x; x=y; y=t; } } main() { int a=4,b=3,c=5; f(a,b); f(a,c); f(b,c); printf("%d,%d,%d/n",a,b,c); } 执行后输出结果是()
A

3,4,5

B

5,3,4

C

5,4,3

D

4,3,5


参考答案

参考解析
解析: 暂无解析
更多 “单选题有以下程序 void f(int x,int y) { int t; if(x y) { t=x; x=y; y=t; } } main() { int a=4,b=3,c=5; f(a,b); f(a,c); f(b,c); printf("%d,%d,%d/n",a,b,c); } 执行后输出结果是()A 3,4,5B 5,3,4C 5,4,3D 4,3,5” 相关考题
考题 阅读下面程序: include void f(int n) { int x(5); static int y(10); if(n>0) { ++ 阅读下面程序:include<iostream.h>void f(int n){int x(5);static int y(10);if(n>0){++x;++y;cout<<x<<","<<y<<endl;}}void main(){int m(1);f(m),}则该程序的输出结果是【 】

考题 下列的程序段中与上题的程序段对y的计算结果相同的是 ______。A.x=34567 y=0 flag=.T. DO WHIL flag y=x% 10+y * 10 x=int(x/10) IF x>0 flag=.F. ENDIF ENDDOB.x=34567 y=0 flag=.T. DO WHIL flag y=x%10+y * 10 x=int(x/10) IF x=0 flag=.F. ENDIF ENDDOC.x=34567 y=0 flag=.T. DO WHIL!flag y=x%10+y* 10 x=int(x/10) IF x>0 flag=.F. ENDIF ENDDOD.x=34567 y=0 flag=.T. DO WHIL!flag y=x%10+y* 10 x=int(x/10) IF x=0 flag=.T. ENDIF ENDDO

考题 有以下程序: void f(int v,int w) { int t; t=v;V=W;W=t; } main() { int x=1,y=3,z=2; if(x>y) f(x,y); else if(y>z) f(y,z); else f(x,z); printf("%d,%d<%d\n",x,y,Z); } 执行后输出结果是( )。A.1,2,3B.3,1,2C.1,3,2D.2,3,1

考题 有如下程序:includevoid fun(intx, int y){int t=x; x=y; y=t;}int main(){int 有如下程序: #include<iostream> void fun(intx, int y){int t=x; x=y; y=t;} int main() { int a[2]={23,42}; fun(a[1],a[0]); std::cout<<a[0]<<","<<a[1]<<std::end1; return 0; } 执行后的输出结果是( )。A.42,42B.23,23C.23,42D.42,23

考题 有以下程序 void f(int x,int y) { int t; if(x<y){ t=x; x=y; y=t; } } main( ) { int a=4,b=3,c=5; f(a,b); f(a,c); f(b,c); printf("%d,%d,%d\n",a,b,c); } 执行后输出的结果是A.3,4,5B.5,3,4C.5,4,3D.3,5,4

考题 有以下程序:void f(int x,int y){ int t;if(xy){t=x;x=Y;y=t;)}main{ int a=4,b=3,c=5;f(a,b);f(a,c);f(b,c);printf(%d,%d,%d\n,a,b,c);}执行后输出结果是( )。A.3,4,5B.5,3,4C.5,4,3D.4,3,5

考题 有如下程序:include void fun (int x,int y){int t=x;x=y;y=t;}int main(){ int 有如下程序: #include <iostream> void fun (int x,int y){int t=x;x=y;y=t;} int main() { int a[2]={23,42}; fun (a[1],a[0]; std::cout<<a[0]<<”,”<<a[1]<<std:: ond1; retum0; }执行后的输出结果是______ 。A.41,41B.23,23C.13,42D.42,23

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

考题 有以下程序void f( int y, int *x){ y=y+*x; *X=*X+y; }main(){ int x=2,y=4;f(y,x);printf("%d %d\n",x,y);}执行后输出结果是______。

考题 以下程序运行后的输出结果是【】。 include void fun(int x,int y) {x=x+y;y=x-y 以下程序运行后的输出结果是【 】。include<iostream.h>void fun(int x,int y){ x=x+y;y=x-y;x=x-y;cout<< x << "," <<y << " ,";}void main( ){ int x=2,y=3;fun(x,y);cout<< x << "," << y << endl;}

考题 分析以下程序执行结果【】。 include int f (int x, int y){return x,y; } double f (d 分析以下程序执行结果【 】。include<iostream.h>int f (int x, int y){return x,y;}double f (double x, double y) {return x,y;}void main() {int a=4, b=6;double c=2.6, d=7.4;cout<<f (a, b) <<","<<f (c, d) <<end1;}

考题 有如下程序: include void fun(intx,int y){int t=x;x=y;y=t;} int ma 有如下程序: #include<iostream> void fun(intx,int y){int t=x;x=y;y=t;} int main() { int a[2]={23,42}; fun(a[1],a[0]; std::cout<<a[0]<<","<<a[1]<<std::ndl; return 0; } 执行后的输出结果是A.42,42B.23,23C.23,42D.42,23

考题 有如下程序: include using namespace std; void f1(int x, int y){int z= 有如下程序:#include<iostream>using namespace std;void f1(int x, int y){int z=x; x=y; y=z;)void f2(int x, int y){int z=x; x=y; y=z;}intmain(){int x=10, y=26;f1(x, y);f2(x, y);cout<<y<<end1;return 0;}运行时的输出结果是( )。A) 10B) 16C) 26D) 36A.B.C.D.

考题 有以下程序:include void f(int v, int w){int t; t=v; v=w; w=t;}main(){int x=1,y=3 有以下程序: #include <stdio.h> void f(int v, int w) { int t; t=v; v=w; w=t; } main() { int x=1,y=3,z=2; if(x>y) f(x,y); else if(y>z) f(y,z); else f(x,z); printf("%d,%d,%d\n",x,y,z); } 执行后的输出结果( )。A.1,2,3B.3,1,2C.1,3,2D.2,3,1

考题 有如下程序 void f(int x,int y) { int t; if(x>y){t=x;x=y;y=t;} } main() { int a=4,b=3,c=5; f(a,b);f(b,c);f(c,a); print("%d,%d,%d\n",a,b,c); }执行后输出结果是______。A.3,4,5B.5,3,4C.5,4,3D.4,3,5

考题 有如下程序:include void fun(int x, int y){int t=x;x=y;y=t;}int main (){int 有如下程序: #include <iostream> void fun(int x, int y){int t=x;x=y;y=t;} int main () { int a[2]={23,42}; fun(a[1],a[0]); std::cout<<a[0]<<","<<a[1]<<std::endl; return 0; } 执行后的输出结果是A.42,42B.23,23C.23,42D.42,23

考题 主调函数中的两个变量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;}

考题 有以下程序: include using namespace std; voidt(intx,inty, intcp,intdp) {cp=x*x+y 有以下程序:include <iostream>using namespace std;void t(int x,int y, int cp,int dp){cp=x*x+y+y;dp=x*x-y*y;}int main(){int a=4,b=3,c=5,d=6;t(a,b,c,D) ;cout<<c<<","<<d<<end1;return 0;

考题 下面程序的运行结果是( )。define EXCH(a,B){int t;t=a;a=b;b=t;}main(){int x=1,y=2;EXCH(x,y);printf("x=%d,y=%d\n",x,y);}

考题 有以下程序void f(int x,int y){ int t, if(x<y){t=x;x=y;t;}}main(){ int a=4,b=3,c=5; f(a,B) ;f(a,C) ;f(b,C) ; cout<<a<<","<<b<<","<<c<<end1;}执行后输出结果是A.3,4,5B.5,3,4C.5,4,3D.4,3,5

考题 下列程序的输出结果是( )。int t(int x,int y,int cp,int dp){cp=x% y+y*y;dp=x+x-y*y;}main(){ im a=4,b=3,c=9,d=8;t(a,b,c,D);printf("%d%d\n",c,D);}

考题 下面程序的运行结果是void swap(int *a,int *b){ int *t; t=a;a=b;b=t;}main(){ int x=3,y=5,*p=x,*q=y; swap(p,q); printf("%d%d\n",*p,*q);}

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

考题 有如下程序:inchdevoid fun(int x,int y){int t=x;x=y;y=t;}int main(){int a 有如下程序: #inchde<iostream.h> void fun(int x,int y){int t=x;x=y;y=t;} int main() { int a[2]={23,42); fun(a[1],a[0]); std::cout<<a[0]<<","<<a[1]<<Std::endl; return 0; } 执行后的输出结果是( )。A.42,42B.23,23C.23,42D.42,23

考题 有以下程序:include void f(int * x,int * y) int t;t= *x; *x= *y; *y=t;main ( ){in 有以下程序:#include <stdio.h>void f(int * x,int * y) int t; t= *x; *x= *y; *y=t;main ( ){ int a[8] = { 1,2,3,4,5,6,7,8} ,i, * p, * q; p=a;q =a[7]; while(p<q) { f(p,q) ;p ++ ;q --; } for(i =0;i<8;i ++ ) printf(" % d," ,a[i]); }程序运行后的输出结果是( )。A.8,2,3,4.,5,6,7,1,B.5,6,7,8,1,2,3,4,C.1,2,3,4,5,6,7,8,D.8,7,6,5,4,3,2,1,

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

考题 单选题有以下程序 void f(int v,int w) { int t; t=v; v=w; w=t; } main() { int x=1,y=3,z=2; if(xy) f(x,y); else if(yz) f(y,z); else f(x,z); printf("%d,%d,%d/n",x,y,z); }执行后输出结果是()A 1,2,3B 3,1,2C 1,3,2D 2,3,1