网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
执行如下程序将输出():includeusing namespace std;class Base{public:Base(){cout<<

执行如下程序将输出( ): #include<iostream> using namespace std; class Base { public: Base(){cout<<"BB";fun();} void fun (){tout<<"Brim";} }; class Derived:public Base { public: Derived(){cout<<"DD";} void fun (){cout<<"Dfun";} }; int main(){Derived d;return 0;}

A.DD

B.BBDfunDDDfun

C.BBBfunDD

D.DDBBBfun


参考答案

更多 “ 执行如下程序将输出():includeusing namespace std;class Base{public:Base(){cout 执行如下程序将输出( ): #include<iostream> using namespace std; class Base { public: Base(){cout<<"BB";fun();} void fun (){tout<<"Brim";} }; class Derived:public Base { public: Derived(){cout<<"DD";} void fun (){cout<<"Dfun";} }; int main(){Derived d;return 0;}A.DDB.BBDfunDDDfunC.BBBfunDDD.DDBBBfun ” 相关考题
考题 有如下程序:include using namespace std;class Base{public:Base(){cout 有如下程序:#include <iostream>using namespace std;class Base{ public: Base(){cout<<"BB"; f(); } Void f(){cout<<"Bf"; }};class Derived: public Base{ public: Derived() { cout<<"DD"; } void f() { cout<<"Df"; }};int main() { Derived d; return 0; }执行上面的程序将输出( )。A.BBBfDDB.BBDfDDDfC.DDD.DDBBBf

考题 有如下程序: include using namespace std; class BASE { public 有如下程序: #include<iostream> using namespace std; class BASE { public: ~BASE(){cout<<"BASE";} }; class DERIVED:public BASE { public: ~DERIVED(){cout<<"DERIVED";} }; int main(){DERIVEDx;retum 0;} 执行后的输出结果是A.BASEB.DERIVEDC.BASEDERIVEDD.DERIVEDBASE

考题 有如下程序:includeusing namespace std;class Base{protected:Base(){cout 有如下程序: #include<iostream> using namespace std; class Base{ protected: Base(){cout<<'Base';} Base(char c){cout<<c;} }; class Derived:public Base{ public: Derived(char c){cout<<c;} }; int main(){ Derived d('Derived'); return 0; } 执行这个程序屏幕上将显示输出( )。A.DerivedB.DerivedBaseC.BaseDerivedD.DerivedDerived

考题 有如下程序:include using namespace std;class Base{public:Base(){ cout 有如下程序: #include <iostream.h> using namespace std; class Base { public: Base(){ cout<<"BB"; f(); } voidf(){cout <<"Bf"; } }; class Derived: public Base { public: Derived (){cout<<"DD";} void f(){cout<<"Df";} }; int main(){Derived d; return 0;} 执行上面的程序将输出A.BBBfDDB.BBDfDDDfC.DDD.DDBBBf

考题 有如下程序:include using namespace std;class BASE{public:~BASE(){cout 有如下程序: #include <iostream> using namespace std; class BASE{ public: ~BASE(){cout<<"BASE";} }; class DERIVED:public BASE{ public: ~DERIVED(){cout<<"DERIVED";} }; int main(){DERIVED x;return 0;} 执行后的输出结果是A.BASEB.DERIVEDC.BASEDERIVEDD.DERIVEDBASE

考题 有如下程序:includeusing namespace std;class BASE{public:~BASE( ){cout 有如下程序: #include<iostream> using namespace std; class BASE{ public: ~BASE( ){cout<<"BASE";} }; class DERIVED:public BASE{ public: ~DERIVED( ){cout<<"DERIVED";} }; int main( ){DERIVED x;return 0;} 程序的输出结果是A.BASEB.DERIVEDC.BASEDERIVEDD.DERIVEDBASE

考题 有如下程序:include using namespace std;class Base{public:Base(){ cout 有如下程序: #include <iostream> using namespace std; class Base { public: Base(){ cout<<"BB";f(); } void f() { cout<<"Bf";} }; class Derived:public Base { public: Derived() { cout<<"DD"; } void f(){ cout<<"Df"; } }; int main(){ Derived d; return 0;}执行上面的程序将输出______ 。A.BBBfDDB.BBDfDDDfC.DDD.DDBBBf

考题 有如下程序:include using namespace std;class BASE{public:~BASE() {cout 有如下程序: #include <iostream> using namespace std; class BASE{ public: ~BASE() {cout<<"BASE"; } }; class DERIVED: public BASE { public: ~DERIVED() {cout<;"DERIVED"; } }; int main(){DERIVED x; return 0;} 执行后的输出结果是______ 。A.BASEB.DERIVEDC.BASEDERIVEDD.DERIVEDBASE

考题 有如下程序:includeusing namespace std;class BASE{public:~BASE(){cout 有如下程序: #include<iostream> using namespace std; class BASE{ public: ~BASE(){cout<<"BASE";} }; class DERIVED:public BASE{ public: ~DERIVED(){cout<<"DERIVED";} }; int main(){DERIVED x;return 0;} 执行后的输出结果是( )。A.BASEB.DERIVEDC.BASEDERIVEDD.DERIVEDBASE