下列程序的运行结果为 #include<iostream.h> class Location { protected: int X,Y; publiC: void SeX(int myx){X=myx;} void SetY(int myy){Y=myy;} void showxy( ) {cout<<"X=" <<X<<" " <<"Y"=<< Y<< endl;} }; Class Rectangle :public Location{
A.X=3 Y=5 X=3 Y=5 H=4 W=6
B.X=3 Y=5 X=3 Y=5 H=3 W=6
C.X=3 Y=5 X=3 Y=4 H=4 W=6
D.X=3 Y=5 X=3 Y=3 H=4 W=6
第1题:
下列程序的运行结果是( )。#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.20049
B.92004
C.0
D.编译时出错
第2题:
下列程序的运行结果是 #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 9
B.9 2004
C.0 0
D.编译时出错
第3题:
下列程序段的输出结果是 #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
第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 *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.63
B.36
C.编译出错
D.0
第6题:
下列程序的运行结果是 #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