高等继续教育 / 面向对象程序设计
题型描述: 简答题
写出下列程序的输出结果。
#include< iostream.h>
class AA{
public :
AA{}{cout<< ConstructorofAA.\n;fun( );}
virtual void fun( ){cout< };
class BB:public AA{
public :
BB( ){cout<< Constructor of BB.\n; fun( );}
void fun( ){cout<< BB::fun( )is called.\n;}
};
void main( ){BB d;}
写出下列程序的输出结果。
#include< iostream.h>
class AA{
public :
AA{}{cout<< ConstructorofAA.\n;fun( );}
virtual void fun( ){cout<
class BB:public AA{
public :
BB( ){cout<< Constructor of BB.\n; fun( );}
void fun( ){cout<< BB::fun( )is called.\n;}
};
void main( ){BB d;}
参考答案:
佳题速递: