下面程序的结果为()#include<iostream.h>;intc;classA

10 查阅

下面程序的结果为()#include<iostream.h>;intc;classA

{

private:

inta;staticintb;public:

A(){a=0;c=0;}

voidseta(){a++;}

voidsetb(){b++;}

voidsetc(){c++;}

voiddisplay(){cout<<a<<""<<b<<""<<c;}

};intA.:b=0;voidmain()

{

Aa1,a2;a1.seta();a1.setb();a1.setc();a2.seta();a2.setb();a2.setc();a2.display();}

A.121

B.122

C.112

D.222

参考答案:

答案:122