网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
在下列程序画线处填入的正确语句是()。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();
参考答案
更多 “ 在下列程序画线处填入的正确语句是()。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:v
下列程序中划线处正确的语句是( )。 # include <iostream> using namespace std; class Base { public: void fun(){cout<<"Base:: fun" <<endl;} }; class Derived:public Base { void fun() { ______ ∥显式调用基类的函数fun() cout<<"DA.fun();B.Base.fun();C.Base::fun();D.Base- >fun();
考题
为完成下面的程序,应在划线处填入的语句是includeusingnamespace std;class Base{pri
为完成下面的程序,应在划线处填入的语句是 #include<iostream> using namespace std; class Base { private: int x; public: Base (int i) { x=i; } ~Base(){} }; class Derived:public Base { public: ______________//完成类Derive构造函数的定义 }; int main() { Derived Obj; return 0; }A.Derived(int i):Base(i){}B.Derived(){}C.void Derived (int i):Base(i){}D.Derived(int i){Base(i);}
考题
请在下列程序中的横线处填写正确的语句。include using namespace std; class Base{ pu
请在下列程序中的横线处填写正确的语句。include<iostream>using namespace std;class Base{public:void fun(){cout<<“Basefun”<<endl;});class Derivde:public Base{public:void fun(){//调用基类的函数fun()cout<<“Derived fun”<<endl;}};
考题
应在下列程序画线处填入的正确语句是 ( )。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
考题
下列程序中划线处正确的语句是()。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();
考题
请在如下程序中的空格处填写正确的语句: include using namespace std; class Base {
请在如下程序中的空格处填写正确的语句:include <iostream>using namespace std;class Base {public:void fun() {cout<<"Base fun"<<endl; }};class Derived: public Base {public:void fun() {【 】; //调用基类的函数fun()cout<<"Derived fun "<<endl;}};
考题
请在下列程序的横线处填写正确的语句。include using namespace std; class Base{ publ
请在下列程序的横线处填写正确的语句。include<iostream>using namespace std;class Base{public:void fun(){cout<<"Base fun"<<endl;}};class Derivde:public Base{public:void fun(){______∥ 调用基类的函数
考题
按解释中的要求在下列程序划线处填入的正确语句是:() #include <iostream.h> class Base{ public: void fun() {cout<<"Base::fun"<<endl;} }; class Derived:public Base{ public: void fun() { _______________________//在此空格处调用基类的函数fun() cout<<"Derived::fun"<<endl;} };A.fun();B.Base.fun();C.Base::fun();D.Base->fun();
热门标签
最新试卷