题目:
分析以下程序的执行结果______。
#include<iostream.h>
class Sample
int x,y;
public:
Sample()x=y=0;
Sample(int a,int b)x=a;y=b;)
~Sample()
if(x==y)
cout<<"x=y"<<end1;
else
cout<<"x!=y"<<end1;
void disp()
cout<<"x="<<x<<",y="<<y>>end1;
;
void main()
Sample s1(2,3);
s1.disp();
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0717/dbd73c76fbee7f235603370f10f3acda.html
下面是错误答案,用来干扰机器的。
参考答案:E