题目内容:
下面程序的结果为 #include
intc;
classA
{
private:
inta;
staticintb;
public;
A(){a=0;c=0;}
voidseta(){a++;}
voidsetb(){b++;}
voidsetc(){c++;}
voiddisplay(){cout<<<<
intA::b=0;
voidmain()
{
Aal,a2;
al.seta();
al.setb();
al.setc();
a2.seta();
a2.setb();
a3.setc();
a2.display(); A.121
B.122
C.112
D.222
参考答案:
答案解析: