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

题目内容 (请给出正确答案)

下列程序中画线处应填入的语句是 class Base { public: void fun(){cout<<"Base of fun"<<end1:} }; class Derived:public Base { void fun() { _______//显示基类的成员函数fun cout<<"Derived of fun"<<end1; } };

A.fun();

B.Base.fun();

C.Base∷fun();

D.Base- >fun();


参考答案

更多 “ 下列程序中画线处应填入的语句是 class Base { public: void fun(){cout<<"Base of fun"<<end1:} }; class Derived:public Base { void fun() { _______//显示基类的成员函数fun cout<<"Derived of fun"<<end1; } };A.fun();B.Base.fun();C.Base∷fun();D.Base- >fun(); ” 相关考题
考题 下列程序中画线处应填入的语句是class Base{public:void fun(){cout ”Base of fun”};class Derived:public Base{void fun(){//显示基类的成员函数funcout ”Derived of fun”};A.fun();B.Base. fun();C.Base::fun();D.Base- fun-:

考题 在下列横线处应添加的语句是( )。 class Base{public:void fun(){cout<<"Base::fun"<<end1;}}; class: Derived: public Base { public: void fun() { ______//显示调用基类的fun函数 cout<<"Derived::fun"<<end1; } };A.Derived::funB.Base::fun();C.Pubic::funD.fun();

考题 在下列程序画线处填入的正确语句是()。includeusing namespace std;classBase{public: 在下列程序画线处填入的正确语句是( )。 #include <iostream> using namespace std; class Base { public: void fun() { cout<<"Base::fun",<<end1; } }; class Derived:public Base { void fun() { ______________ //显式调A.fun();B.Base.fun();C.Base::fun();D.Base->fun();

考题 有如下程序:include using namespace std;class Base{public:void fun() {cout 有如下程序:#include <iostream>using namespace std;class Base { public: void fun() {cout<<"Base:: fun"<<end1; }};class Derived: public Base ( public: void fun() { ____________________________ cout<<"Derived:: fun"<<end1; }};int main() { Derived d; D. fun(); return O;}已知其执行后的输出结果为:Base:: funDerived:: fun则程序中下划线处应填入的语句是( )。A.Base. fun ();B.Base:: fun ();C.Base->fun();D.fun()

考题 下列程序中画线处应填入的语句是 class Base { public: void fun( ){cout<<"Base of fun"<<end1;} }; class Derived:public Base { void fun( ) { ______//显示基类的成员函数fun cout<A.fun( );B.Base.fun( );C.Base: :fun( );D.Base->fun( );

考题 应在下列程序画线处填入的正确语句是 ( )。include using namespace std;clas Base{pu 应在下列程序画线处填入的正确语句是 ( )。 #include <iostream> using namespace std; clas Base { public: void fun() { cout<<"Base::fun"<<end1; } }; class Derived : public Base { void fun() { ________________//显示调用基类的函数 fun() cout<<"Derived::fun"<<end1; } };A.fun();B.Base.fun();C.Base::fun();D.Base->fun();

考题 为使程序的输出结果为: Base:: fun 那么应在下列程序画线处填入的正确语句是( )。 #include <iostream> using namespace std; class Base { public: void fun () { cout<<"Base: :fun"<<end1; } }; class Derived : public Base { public: void fun ( ) { cout<<"Derived: :fun"<<end1; } }; int main ( ) { Base a,*pb; Derived b; _________; pb->fun(); //调用基类的成员函数 fun() return 0 ; }A.pb=aB.pb=bC.pb=bD.pb=Base

考题 有如下程序: #includeiostream using namespace std; classBase{ public: void fun{ __________________ cout”Base::fun”endl;} }; class Derived:public Base{ public: voidfun{ cout”Derived::fun”endl: } }; int main{ Derived d; A fun; return 0; } 已知其执行后的输出结果为: Base::fun Derived::fun 则程序中下画线处应填入的语句是( )。A. Base.fun;B.Base::fun;C.Base—fun;D.fun;

考题 下列程序中划线处正确的语句是()。include using namespace std;class Base{public:vo 下列程序中划线处正确的语句是( )。#include <iostream>using namespace std;class Base{public:void fun() { cout<<"Base:: fun"<<end1; }};class Derived: public Base{ void fun() { _______________________ //显试调用基类的函数 fun() cout <<"Derived:: fun"<<end1;};A.fun();B.Base. fun();C.Base:: fun();D.Base->fun();