#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"<<endl;
else cout<<"x!=y"<<endl; }
void disp()
{ cout<<"x="<<x<<",y="<<y<<endl; } };
void main()
{ Sample s1(2,3); s1.disp(); }
此题为单选题
(A)、 x=2,y=3
(B)、 x=0,y=0
(C)、 x!=y
(D)、 x=2,y=3<换行> x!=y
答案可能是D,为什么呢?