下面程序输出的结果为( )。includeiostream.hclassA{public:A(){cOUtCLASSAendl;}~A(){}};ClaSSB:publicA{public:B
13 查阅
下面程序输出的结果为( )。
include"iostream.h"
classA
{public:
A(){cOUt"CLASSA"endl;}
~A(){}};
ClaSSB:publicA
{public:
B(){cout"CLASSB"endl;}
~B(){}};
voidmain()
{A*P;
P=newB:
B*q:
q=newB;}
A.CLASSA
B.CLASSACLASSBCLASSBCLASSB
C.CLASSA
D.CLASSACLASSBCLASSBCLASSACLASSBCLASSBCLASSB
参考答案: