下列程序的输出结果是( )。
#include<iostream>
using namespace std;
class TestClass
static int i;
public:
TestClass()i++;
~TestClass()i--;
static int getVal()return i;
;
int TestClass::i=O;
void fun()TestClass ob2;cout<<ob2.getVal();
int main()
TestClass ob1;
fun();
TestClass*ob3=new TestClass;cout<<ob3->getVal();
delete ob3;cout<<TestClass::getVal();
return 0;
A.111
B.121
C.211
D.221