有如下程序: #include<iostream> usingnamespacestd; classA { public: A(){cout<&l有如下程序: #include<iostream> usingnamespacestd; classA { public: A(){cout<<"A";} ~A(){cout<<"~A";} }; classB { A*P: public: B(){cout<<"B";p=newA;} ~B(){cout<<"~B";deleteP;} }; intmain() { Bobi; return0; } 执行这个程序的输出结果是()。
A. BAA~A~B~A
B. ABA~B~A~A
C. BAA~B~A~A
D. ABA~A~B~A