【C16】
A.pay
B.provide
C.allow
D.finance
第1题
以下程序的输出的结果是()。#include <iostream.h>int x=3;void main(){ void incre(); int i; for (i=1;i<x;i++) incre();}Void incre(){ static int x=1; x*=x+1; cout<<x<<"";}
A.3 3
B.2 2
C.2 6
D.2 5
第2题
以下程序的输出结果是 #include<iostream.h> void main() {int x=1,y=3; cout << x++ << ","; {int x=0;x+=y*2; cout <<X <<"," <<y << ","; } cout << x <<","<< y; }
A.1,6,3,1,3
B.1,6,3,6,3
C.1,6,3,2,3
D.1,7,3,2,3
第3题
以下程序运行后的输出结果是【 】。
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;}
第4题
以下程序的输出结果是 #include<iostream.h> void main() { int x=1,y=3; cout << x++ << " , "; { int x=0;X+=y*2; cout<<x<<" ,"<<y<<" ;"; } cout<<x<<" ,"<<y; }
A.1,6,3,1,3
B.1,6,3,6,3
C.1,6,3,2,3
D.1,7,3,2,3
第5题
以下程序的输出结果是()。 #include <iostream> using namespace std; int x=10; void main() { int x=20; x+=::x; { int x=50; ::x+=x; } cout< <x> <<’\t’<<::x<<’\n’; }> A、6 4
B、30 60
C、3 4
D、::x是非法引用
第6题
以下程序输出结果是 ______。 #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.0
B.4
C.10
D.无定值
第7题
下列程序的运行结果是 #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
第8题
下列程序段的输出结果是 #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.2143
B.1212
C.1234
D.2112
第9题
下列程序段的输出结果是 #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 < < end1; }
A.2143
B.1212
C.1234
D.2112
第10题
下面程序的输出结果是【 】。
define MIN(a,b) (((a)<(b))?a:b)
include <iostream.h>
void main()
{
int x= 3, y=5;
cout<< MIN(x,y)<<end1;
}
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!