【单选题】下列程序的运行结果是 void fun(int *a, int *b) { int *k; k=a; a=b; b=k; } int main(void) { int a=3, b=6, *x=a, *y=b; fun(x,y); printf("%d %d", a, b); return 0; }A.6 3B.3 6C.编译出错D.0 0

【单选题】下列程序的运行结果是 void fun(int *a, int *b) { int *k; k=a; a=b; b=k; } int main(void) { int a=3, b=6, *x=&a, *y=&b; fun(x,y); printf("%d %d", a, b); return 0; }

A.6 3

B.3 6

C.编译出错

D.0 0


参考答案和解析
3

相关考题:

下列程序的输出结果是()。includevoid fun(int*a,int*B){int *k;k=a;a=b;b=k;}main(){i 下列程序的输出结果是( )。 #include<stdio.h> void fun(int*a,int*B){ int *k; k=a;a=b;b=k;} main() { int a=1,b=2,*x=a,*y=b; fun(x,y); printf("%d%d",a,B); }A.2 1B.1 2C.编译出错D.0 0

下列程序的运行结果是()。includevoid fun (int *a,int*b){int*kk=a;a=b;b=k}void 下列程序的运行结果是( )。 #include< iostream.h> void fun (int *a,int*b) {int*k k=a;a=b;b=k} void main() {int a=2004, b=9,*x=a,*y=b; fun(x, y) ; cout<<a<<" "<<b<<endl:}A.20049B.92004C.0D.编译时出错

有下列程序:fun(int x,int y){statlc int m=0,i=2;i+=m+1;m=i+X+y;return m;}main(){int j=1,m=1,k;k=fun(j,m);printf("%d,",k);k=fun(j,m);printf("%d\n",k);}执行后的输出结果是( )。A.5,5B.5,11C.11,11D.11,5

下列程序的运行结果是void fun(int *a, int *b){ int *k;k=a; a=b; b=k;}main(){ int a=3, b=6, *x=a, *y=b;fun(x,y);printf("%d %d", a, b);}A.6 3B.3 6C.编译出错D.0 0

阅读下列程序: include void fun(int n) { int x(5); static int y(10); if(n>0) { 阅读下列程序:include<iostream.h>void fun(int n){int x(5);static int y(10);if(n>0){++x;++y;cout<<x<<","<<y<<endl;}}void main()int m(1);fun(m);}则该程序的输出结果是______。

下列程序的运行结果是 ______。 void fun(int * a,int *B) { int*k; k=a;a=b;b=k; } main() { int a=3,b=6,*x’a,*y’b; fun(x,y); printf("%d%d",a,B) ; }A.6 3B.3 6C.编译出错D.0

下面程序的运行结果是______。 include void fun(int a,int b=3) { static int 下面程序的运行结果是______。include<iostream.h>void fun(int a,int b=3){static int i=2;a=a+b+i;i=i+a;}void main(){int x=5,y=2;fun(x,y);cout<<x<<",";fun(x);cout<<x<<endl;}

下面程序的运行结果为_____。 include void fun(int x=0,int y=0) { cout 下面程序的运行结果为_____。include<iostream.h>void fun(int x=0,int y=0){cout < < x < < y;}void main( ){fun(5) ;}

有以下程序includefloat fun(int x,int y){return(x+y);}void main( ){int a=2,b=5 有以下程序 #include<iostream.h> float fun(int x,int y) {return(x+y);} void main( ) {int a=2,b=5,c=8; cout<<fun((int)fun(a+c,b) ,a-c) ;}程序运行后的输出结果是A.编译出错B.9C.21D.9

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

下列程序的运行结果是()。includevoid fun(int*s,int*p){ static int t=3;*p=s[t];t--; 下列程序的运行结果是( )。#include<stdio.h>void fun(int*s,int*p){ static int t=3; *p=s[t]; t--;}void main(){ int a[]={2,3,4,5),k; int x; for(k=0;k<4;k++) { fun(a,x); printf("%d,",x); }}A.5,4,3,2B.2,3,4,5,C.2,2,2,2,D.5,5,5,5,

下列程序的运行结果是______。 void fun(int *a,int *b) { int *k; k=a;a=b;b=k; } main() { int a=3,b=6,*x=a,*y=b; fun(x,y); printf("%d%d",a,b); }A.63B.36C.编译出错D.0

下列程序的运行结果是includevoid fun(int * a,int * b){int * k; k=a; a=b; b=k;} 下列程序的运行结果是 #include<iostream.h> void fun(int * a,int * b) { int * k; k=a; a=b; b=k; } void main( ) { int a=3,b=6, * x=a, * y=b; fun(x, y) ; cout < < a < < " " < < b; }A.6 3B.3 6C.编译出错D.0 0

有以下程序:includeFloat fun(int x, int y){return(x+y) ;}void main( ){int a=2, 有以下程序: #include<iostream.h> Float fun(int x, int y) { return(x+y) ;} void main( ) { int a=2,b=5,c=8; cout < < fun((int) fun(a+c, b) ,a-c) ;} 程序运行后的输出结果是A.编译出错B.9C.21D.9.0

下列程序的运行结果是()。includevoid fun(int *a, int *b) {int *k; k=a; a=b; b= 下列程序的运行结果是( )。#include<iostream.h>void fun(int *a, int *b) {int *k; k=a; a=b; b=k;}void main(){int a=2OO4,b=9,*x=a,*y=b;fun(x, y);cout<<a<<" "<<b<<end1;}A.20049B.92004C.0D.编译时出错

以下程序输出结果是 ______。includevoid fun(int x,int y,int z){z=x+y;}void main 以下程序输出结果是 ______。 #include<iostream.h> void fun(int x,int y,int z){z=x+y;} void main() { int a=10; fun (2,2,a); cout<<a; }A.0B.4C.10D.无定值

下列程序的运行结果是 inClude roid fun(int *a,int * b) { int * k; k=a;a=b 下列程序的运行结果是 #inClude<iostream.h> roid fun(int *a,int * b) { int * k; k=a;a=b;b=k;} void main( ) { int a=2004,b=9,* x=a,* y=b; fun(x,y); cout < < a < <" " < < b < < end1;}A.2004 9B.9 2004C.0 0D.编译时出错

有如下程序段void fun(int *a, int *b){ int *k; k=a; a=b; b=k;}main(){ int a=3, b=6, *x= fun(x,y); printf("%d %d", a, b);} 程序运行后输出的结果是A.6 3 B.3 6 C.编译出错 D.0 0

下面程序的运行结果是#include "stdio.h" void fun(int k,int *p) { int a,b; if(k==1|| k==2) *p=1; else { fun(k-1,a); fun(k-2,b); *p=a+b; } }main(){ int x; fun(6,x); printf("%d\n",x);}

下面程序的运行结果是【】。 include using namespace std; void fun(inta,int b=3) 下面程序的运行结果是【 】。include <iostream>using namespace std;void fun(int a, int b=3){static int i=2;a = a + b + i;i = i + a;}int main(){int x=5, y=2;fun(x, y);cout<<x<<",";fun(x);cout<<x<<end1;return 0;}

以下程序的输出结果是#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);}

下列程序运行后的输出结果是()。includevoid fun(int,int,int*);void main(){int x, 下列程序运行后的输出结果是( )。 #include<iostream.h> void fun(int,int,int*); void main() { int x,y,z; fun(5,6,x); fun(7,x,y); fun(x,y,z); cout<<x<<","<<y<<","<<z<<endl; } void fun(int a,int b,int *c) { b+=a; *c=b-a; }A.5,5,5B.6,6,6C.5,6,7D.7,7,7

下列程序的运行结果是includevoid fun(int *a,int *B){int *k;k=a;a=b;b=k;}void m 下列程序的运行结果是 #include<iostream.h> void fun(int *a,int *B) {int *k; k=a;a=b;b=k; } void main( ) {int a=3,b=6,*x=a,*y=b; fun(x,y); cout << a <<" "<< b; }A.63B.36C.编译出错D.0

下列程序的运行结果是includevoid fun(int*a,int*b){int*k; k=a;a=b;b=k;}void mai 下列程序的运行结果是 #include<iostream.h> void fun(int*a,int*b) { int*k; k=a;a=b;b=k; } void main() { int a=3,b=6,*x=a,*y=b; fun(x,y); cout < < a < < " " < < b; }A.6 3B.3 6C.编译出错D.O 0

下列程序运行后的输出结果是()。 include void fun(int,int,int*); void main() { i 下列程序运行后的输出结果是( )。 #include<iostream.h> void fun(int,int,int*); void main() { int x,y,z; fun(5,6,x); fun(7,x,y); fun(x,y,z); cout<<x<<","<<y<<","<<z<<end1; } void fun(int a,int b,int *c) { b+=a; *c=b-a; }A.5, 5, 5B.6, 6, 6C.5, 6, 7D.7, 7, 7

下列程序的运行结果是()。includevoid fun(int *a, int *b){int *k; k=a; a=b; b=k;}ma 下列程序的运行结果是( )。 #include <stdio.h> void fun(int *a, int *b) { int *k; k=a; a=b; b=k; } main() { int a=3,b=6, *x=a, *y=b; fun(x,y); printf("%d%d",a,b);A.6 3B.3 6C.编译出错D.0 0

下列程序的运行结果是()。void fun(int*a,int*b){int *k;k=a;a=b;b=k;}main(){int a=3,b=6,*x=a,*y=b; fun(x,y); printf("%d%d",a,b); }A.63B.36C.编译出错D.0 0

单选题有以下程序#include int fun(int x,int y){ static int m=0,i=2; i+=m+1; m=i+x+y; return m;}main(){ int j=1,m=1,k; k=fun(j,m); printf(%d,,k); k=fun(j,m); printf(%d,k);}执行后的输出结果是(  )。A5,11B5,5C11,11D11,5