网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
下列程序运行后的输出结果是( )。
#include
using namespace std;
int fun(int x) { return x*x; }
double fun(double x,int y=2) { return x*y; }
int main()
{
int a=5;
double b= 1.2;
cout
}
A. 27.4
B.26.44
C. 12.4
D.程序有误
参考答案
更多 “ 下列程序运行后的输出结果是( )。#includeusing namespace std;int fun(int x) { return x*x; }double fun(double x,int y=2) { return x*y; }int main(){int a=5;double b= 1.2;cout}A. 27.4B.26.44C. 12.4D.程序有误 ” 相关考题
考题
有如下程序: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
考题
有如下程序: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 x=y;y=t;}int main(){in
如下程序的输出结果是 #include<iostream> void fun(int & X,inty){intt=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 main(){int a=25; fun(A); }fun(int *x){ print
下面程序的运行结果是( )。include<stdio.h>main(){int a=25;fun(A);}fun(int *x){ printf("%d\n",++*x);}
考题
下列程序段的输出结果是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
考题
下列程序运行后的输出结果是()。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*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 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
考题
下列程序运行后的输出结果是:_____ #include<stdio.h> void fun(int *pa, int pb ) { int pt; pt = *pa, *pa = pb, pb = pt; } int main() { int x=1, y=2; fun(x, y); printf("%d", x==y); return 0; }
考题
50、下列程序运行后的输出结果是:_____ #includestdio.h void fun(int *pa, int pb ) { int pt; pt = *pa, *pa = pb, pb = pt; } int main() { int x=1, y=2; fun(x, y); printf("%d", x==y); return 0; }
热门标签
最新试卷