下列程序的输出结果是#includeclass Myclass{public:Myclass(int i=0,int j=0){x=i;
12 查阅
下列程序的输出结果是 #include<iostream.h> class Myclass{ public:Myclass(int i=0,int j=0) { x=i; y=j; } void show( ) {cout < <"x=" < < x < <" " <"y=" < < y < < endl;} void show( ) const{cout < <"x=" < <" " < <"y=" < < y < < endl;} privated: int x; int y; }; void main( ) { Myclass my1(3,4) ; const my2(7,8) ; my1.show( ) ;my2.show( ) ;}
A.x=4,y=3;x=7,y=8
B.x=3,y=4;x=7,y=8
C.x=7,y=8;x=4,y=3
D.x=8,y=7;x=7,y=8
参考答案: