网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
下列程序的运行结果是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 3
B.3 6
C.编译出错
D.O 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 ” 相关考题
考题
以下程序的执行结果是______ includevoid func(int); void main(){ int k=4 func(k)
以下程序的执行结果是______include<iostream.h>void func(int);void main(){int k=4func(k) ;func(k) :cout<<end1;}void func(int a){static int m=0;m+=a;cout<<m<<" ";}
考题
下列程序的输出结果是()。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
考题
以下函数用来求出数组的最大元素在数组中的下标并存放在k所指的存储单元中。请填空。include<iostream.h>void fun(int * s,int t,int * k){ int i;* k=【 】;【 】if(s[ * k] < s[i]) * k=i;}void main( ){ int a[l0]={ 876,675,896,101,301,401,980,431,451,777 },k;fun(a,10,k);
考题
下列程序的运行结果是()。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.编译时出错
考题
下面程序的运行结果是 include void fun(int * a,int * b) { int x= * a; * a= *
下面程序的运行结果是#include<iostream.h>void fun(int * a,int * b){int x= * a;* a= * b; * b=X;cout < < * a < < * b < <" ";}void main( ){int x=1,y=2;fun(x,y) ;cout < < X < < y < < endl;}A.12 12B.12 21C.21 12D.21 21
考题
以下程序的运行结果是______。 include fun(int a,int b) { int m=0,i=2; i+=m+1; m
以下程序的运行结果是______。include<iostrearn.b>fun(int a,int b){int m=0,i=2;i+=m+1;m=i+a+b;return m;}void main(){int k=4,m=1,p;p=fun(k,m);cout<<p<<end1;}
考题
阅读下列程序: 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);}则该程序的输出结果是______。
考题
阅读下面程序:include int fun( int a, int b ){int c;c=a*b;return c;}void main()
阅读下面程序:include <iostream.h>int fun( int a, int b ){int c;c=a*b;return c;}void main(){int a=3,b=5,c=4,x=0;x=fun(fun(a, b),c);cout<<x<<end1;}其运行结果是【 】。
考题
下面程序的运行结果是______。 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) ;}
考题
下列程序的运行结果是()。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
考题
下列程序的运行结果是()。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.编译时出错
考题
请读程序: include void fun(int * s) { static int j=0; do s[j]+=s[j+1]
请读程序: # include<stdio.h> void fun(int * s) { static int j=0; do s[j]+=s[j+1] while( + + j<2); } main( ) { int k,a[10]={l,2,3,4,5}; for(k=l;k<3;k+ +)fun(a); for(k=0;k<5;k++)prinf("%d",a[k]); } 上面程序的输出结果是 ( )A.34756B.23445C.35745D.12345
考题
有下列程序: include void fun(int * s,int n1,int n2) { int i,j,
有下列程序: #include <stdio.h> void fun(int * s,int n1,int n2) { int i,j,t; i=n1;j=n2; while(i<j){t=s[i];s[i]=s[j];s[j]=t;i++;j--;} } main() { int a[10]={1,2,3,4,5,6,7,8,9,0},k; fun(a,0,3); fun(a,4,9);fun(a,0,9); for(k=0;k<10;k++)printf("%d",a[k]);printf("\n"); } 程序的运行结果是( )。A.987654321B.4321098765C.5678901234D.987651234
考题
下面程序的运行结果是 ______。 include void main() { char str[]="SSSWLIA",c; int
下面程序的运行结果是 ______。include<iostream.h>void main(){char str[]="SSSWLIA",c;int k;for(k=2;(c=str[k]!='\0';k++){switch(c){case'I':++k;break;case'l';continue;default;c
考题
下列程序运行后的输出结果是 ______。 include void main(){ int s=0,k for(k=7;k>=0
下列程序运行后的输出结果是 ______。include<iostream.h>void main(){int s=0,kfor(k=7;k>=0;k--){switch(k){case 1:case 4:case 7:s+ +;break:case 2:case 3:case 6:break;case 0:case 5:s+=2;break;}
考题
以下程序的执行结果是______。 include class CSample{ private: int n; static int
以下程序的执行结果是______。include<iostream.h>class CSample{private:int n;static int k:public:CSample (int i) {n=i;k++;};voiddisp();} ;void CSample::disp(){cout <<"n="<<n<<",k="<<k<<endl}int CSample:
考题
下列程序的运行结果是 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.编译时出错
考题
下面程序的运行结果是#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);}
考题
下列程序运行后的输出结果是()。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
考题
下列程序的运行结果是()。 include void fun(int a,int b=3) { static int i=2
下列程序的运行结果是( )。 #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<<endA.5,2B.7,11C.11,23D.9,23
考题
下列程序的运行结果是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
考题
下列程序运行后的输出结果是()。 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
考题
单选题有以下程序:#include void fun(int *s,int t,int *k){ int p; for(p=0,*k=p;p if(s[p]s[*k])*k=p;}main(){ int a[10]={11,12,13,14,15,16,20,18,19,10},k; fun(a,10,k); printf("%d,%d",k,a[k]);}程序运行后的输出结果是( )。A
6,20B
10,9C
7,20D
10,10
热门标签
最新试卷