赞题库-背景图
单项选择题

假定一个类的构造函数为A(int aa,int bb){a=aa--;b=a*bb;},则执行Ax(4,5);语句后,x.a和x.b的值分别为( )。

A.3和15
B.5和4
C.4和20
D.20和5
<上一题 目录 下一题>
热门试题

单项选择题有如下程序: #include<iostream> using namespace std; int main() { cout.fill(’*’); cout.width(6); cout.fill(’#’); cout<<888<<endl; return 0: } 的执行结果是( )。

A.###888
B.888###
C.***888
D.888***

单项选择题有如下程序: #include<iostream> using namespace std; class Base{ protected: Base(){cout<<ase’;} Base(char c){cout<<c;} }; class Derived:public Base{ public:Derived(char c){cout<<c;} }; int main(){ Derived d(’Derived’); return 0; } 执行这个程序屏幕上将显示输出( )。

A.Derived
B.DerivedBase
C.BaseDerived
D.DerivedDerived