网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
下列程序中下画线处应填入的语句是
class Base
{
public:
void fun( ) {cout < < "Baseoffun" < < endl;}
};
class Derived:public Base
{
void fun( )
{
______//显示基类的成员函数fun
cout < < "Derived of fun" < < endl;
}
};
A.fun( ) ;
B.Base. fun( ) ;
C.Base: :fun( ) ;
D.Base->fun( ) ;
参考答案
更多 “ 下列程序中下画线处应填入的语句是class Base{public:void fun( ) {cout < < "Baseoffun" < < endl;}};class Derived:public Base{void fun( ){______//显示基类的成员函数funcout < < "Derived of fun" < < endl;}};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-:
考题
有如下程序:include using namespace std;class Base{ public: void fun() { cout
有如下程序: #include <iostream> using namespace std; class Base { public: void fun() { cout<<"Base::fun"<<endl; } }; class Derived : public Base { public: void fun() { ______ cout<<"Derived::fun"<<endl; } }; int main() { Derived d; d.fun(); return 0; } 已知其执行后的输出结果为: Base::fun Derived::fun 则程序中下划线处应填入的语句是( )。A.Base.fun();B.Base::fun();C.Base->fun();D.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();
考题
下列程序中横线处应填入的语句是()。 classBase { public: voidfun(){cout"Baseoffun"endl;}}; classDerived:publicBase { voidfun() { //显示基类的成员函数fun cout"Derivedoffun"endl; } };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<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();
考题
下列程序中画线处应填入的语句是 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: roid fun(){cout<<“Base of fun”<<endl;) }; class Derived:public Base { void fun() { //显示基类的成员函数fun cout<<“Derived Of fun”<<endl; } };A.fun();B.Base.fun();C.Base::fun();D.Base->fun();
考题
有如下程序: #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;
热门标签
最新试卷