black

登录

单项选择题

有如下程序:
#include<iostream>
usingnamespacestd;
classB{
public:
B(intxx):x(xx){++count;x+=10;}
virtualvoidshow(  )const
{cout<<count<<'<<x<<endl;}
protected:
staticintcount;
private:
intx;
};
classD:publicB{
public:
D(intxx,intyy):B(XX),y(yy){++count;y+=
100;)
virtualvoidshow(  )const
{cout<<count<<'<<y<<endl);
private:
inty;
};
intB::count==0;
intmain(  ){
B*ptr=newD(10,20);
ptr->show(  );
deleteptr;
return0;
}
运行时的输出结果是(  )。

A.1_120
B.2_120
C.1_20
D.2_20
相关考题

判断题 远期汇率一般比即期汇率高。

单项选择题 有如下程序: #include<iostream> Usingnamespacestd; classBase{ public: Base(intx=O):valB(x){cout<<valB;) ~Base(  ){cout<<valB;) Private: intvalB: }; classDerived:publicBase{ public: Derived(intX=0,inty=0):Base(x),valD(y)(cout<<valD;) ~Derived(  ){cout<<valD;) private: intvalD; }; intmain(  ){ Derivedobj12(2,3); return0; } 运行时的输出结果是(  )。

判断题 同一笔贷款,可以按不同借据还款期限进行拆分分类。

All Rights Reserved 版权所有©在线考试题库网(zxkao.com)

备案号:湘ICP备14005140号-7

经营许可证号:湘B2-20140064