高等继续教育 / 面向对象程序设计
正确率:认证
题型描述: 简答题
写出下面程序的执行结果:
#include<iostream.h>
class AA{
int a;
public :
AA( ){cout<<"Initualizing AA!
";}
~AA( ){cout<<"Destroying AA!
";
};
class BB{
int b;
AA p;
public :
BB( ){cout<<"Initualizing BB!
";}
~BB( ){cout<<"Destroying BB!
";
};
void main( )
{BB X;
cout<<"Ending main!
";
}
参考答案: