题目内容:
有如下程序: #include<iostream>
usingnamespacestd;
classCon
charID;
public:
Con():ID('A){cout<<1;}
Con(charID):ID(ID){eout<<2;}
Con(Con&c):ID(c.getID()){cout<<3;}
chargetID()corlst{returnID;}
};
voidshow(Conc)(cout<<C.getID();}
intmain()
{
Conc1: show(c1);
Conc2('B');
show(c2);
return0;
}
执行上面程序的输出是( )。 A.13A23A
B.23A13B
C.13A23B
D.13823A
参考答案:
答案解析: