当输入d的值22时,以下程序的输出结果是【 】。
void bin (int b) {
if (b>= 2) bin(b/2);
cout<<b%2;
}
void main() {
int d;
cin>>d;
bin(D) ;
}
第1题:
下列程序段的输出结果是 #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
第2题:
下列程序的输出结果是 #inClUde<iostream.h> iht b=2; int funC (int*a) { b+=*a;return(b);} void main() { inta=2,res=2; res+=func(&a); cout<<res;}
A.4
B.6
C.8
D.10
第3题:
2、当输入1 0 0时,以下程序段的输出结果是 。 (易错的关系表达式) #include<iostream> using namespace std; void main() { int a, b, c; cout<<"Please input a, b and c:\n"; cin>>a>>b>>c; if(a<=b<=c) { cout<<"min=a="<<a<<endl; cout<<"max=c="<<c<<endl; } }
第4题:
下列程序段的输出结果是 #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
第5题:
下列程序段的输出结果是 #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