单选题 有如下程序:
#include<iostream>
using namespace std;
class XA
int a;
public:
static int b;
XA(int aa):a(aa)b++;
~XA()
int get()return a;

int XA::b=0
int main()
XA d1(1),d2(3);
cout<<d1.get()+d2.get()+XA::b<<end1;
return 0;

运行时的输出结果是( )。

【正确答案】 C
【答案解析】[解析] 每调用一次get函数时,对新的类A对象进行一次实例化,调用一次构造函数,类A的静态成员变量b便加1。