A.int
B.static int
C.int Fred::
D.static int Fred::
[单选题]在下面的类定义中,横线处应填入的内容是 class Fred { public: void print(){cout<<data<<endl;} void setData(double d)(data=d;} static int count; private: double data; }; count=0; //静态数据成员的定义A.intB.static intC.int Fred::D.static int Fred::
[单选题]在下面的类定义中,横线处应填入的内容是( )。 class Fred { public: void print(){cout<<data<<end1;} void setData(double d}{data=d;} static int count; private: double data; }; ______count=0; //静态数据成员的定义A.intB. static intC.int Fred::D. static int Fred::
[单选题]在下面的定义语句中,画线处应填入的内容是 class Fred{ public: void print( ){cout<<data<<endl;} void setData(double D) {data=d;} static int count; private: double data; }; ______count=0;//静态数据成员的定义A.intB.static intC.int Fred::D.static int Fred::
[单选题]在下面的类定义中,错误的语句是( )。 class Sample { public: Sample(int val): //① ~Sample(); //② private: int a=2.5; //③ Sample(): //④ };A.①②③④B.②C.③D.①②③
[单选题]在下面的类定义中,错误的语句是class Sample { public: Sample(int val); //①~Sample(): //②private: int a=2.5; //③Sample(); //④ };A.①②③④B.②C.③D.①②③
[单选题]在下面的类定义中,错误的语句是( )。class Sample { public:Sample(int val); //①~Sample(); //②private: int a=2.5; //③Sample(); //④ };A.①②③④B.②C.③D.①②③
[单选题]下列程序中横线处应填入的语句是( )。 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();
[单选题]在下面程序的下画线处应填入的选项是 public class Test______{ public static void main(String args[]) { Test t=new Test(); Thread tt=new Thread(t); tt.start(); } public void run() { for(int i=0;i<5;i++) System.out.println("i="+i); } }A.implements RunnableB.extends Thr
[单选题]有如下类的定义。横线处的语句是( )。 class MyClass { public: MyClass(int a=0,int b=0) { X=a; Y=b; } void Change()const { X-=10; Y+=10; } private: ______intX, Y;A.staticB.constC.mutableD.不需要填入内容
[单选题]在下面的类定义中,横线处应填入的内容是( )。A.intB.staticintC.intFred::D.staticintFred::