首页 > 外语类考试
题目内容 (请给出正确答案)
[单选题]

有以下程序: public class ConstOver { public ConstOver (int x, int y, int z) { } } 下面

A.protected int ConstOver (){ }

B.private ConstOver (int z, int y, byte x) { }

C.public object ConstOver (int x, int y, int z) { }

D.public void ConstOver (byte x, byte y, byte z) { }

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“有以下程序: public class ConstOver …”相关的问题
第1题
有以下程序:#include<iostream>using namespace std;class A{private:int a;public:A(int i){a=i

有以下程序: #include<iostream> using namespace std; class A {private: int a; public: A(int i) {a=i;} void disp() {cout<<a<<“,”;}}; class B {private: int b; public: B(int j) {b=j;} void disp() {cout<<b<<“,”;

A.10,10,10

B.10,12,14

C.8,10,12

D.8,12,10

点击查看答案
第2题
有以下类定义 clas sMyClass { public: My Class() { cout<<1;} }; 则执行

有以下类定义 clas sMyClass { public: My Class() { cout<<1;} }; 则执行语句MyClassa,b[2],*p[2];后,程序的输出结果是

A.11

B.111

C.1111

D.11111

点击查看答案
第3题
有以下程序:#include<iostream>using namespace std;#definePl 3.14Class Point{private:int x,y

有以下程序: #include<iostream> using namespace std; #definePl 3.14 Class Point {private: int x,y; public: Point(int a,intB) {X=a; y:b;} int getx() <return x;} int gety() {return y;}}; class Circle:public Point {pri

A.314

B.157

C.78.5

D.153.86

点击查看答案
第4题
有以下程序:#include <iostream>using namespacestd;class A{public:A(int i,int j){ a=1; b=j;}

有以下程序:#include <iostream>using namespace std;class A{public: A(int i,int j) { a=1; b=j; } void move (int x,int y) { a+=x; b+=y; } void show() cout<<a<<","<<b<<end1 } private: int a,b; }; class B : private A { public: B(int i,int 3):A (i,j) {} void fun() { move (3,5); } void f1() { A::show(); } }; int main() { B d(3,4); d.fun(); d.f1(); return 0; } 程序执行后的输出结果是

A.3,4

B.6,8

C.6,9

D.4,3

点击查看答案
第5题
有以下程序#include<iostream> using namespace std;class Complex{public: Complex(double r=O,

有以下程序 #include<iostream> using namespace std; class Complex { public: Complex(double r=O,double i=0):re(r),im(i){} double real() const {return re;} double imag()const {return im;} Complex operator +(Complex C) const {return Complex (re+c.re,im+c.im);} private: double re,im; }; int main() { Complex a=Complex(1,1)+Complex (5); cout<<a.real()<<'+'<<a.imag()<<'i'<<endl; retum 0; } 程序执行后的输出结果是

A.6+6i

B.6+1i

C.1+6i

D.1+1i

点击查看答案
第6题
有以下程序: Class Date { public: Date(int y,int m,mt d); { year=y; month=m; day=d; } Date(int y=2000) { year=y; month=10; day=1; } Date(Date &D) { year=d.year; month=d.month; day=d.day; } Void prin

A.2

B.3

C.4

D.5

点击查看答案
第7题
有以下程序:#include<iostream>using namespace std;class MyClass{public: MyClass(); ~MyClass

有以下程序: #include<iostream> using namespace std; class MyClass { public: MyClass(); ~MyClass(); void SetValue(int val); private: static int i; }; int MyClass::i=0; MyClass::MyClass() { i++; cout<<i; } MyClass::~MyClass() { i--; cout<<i; } void MyClass::SetValue(int val) { i=val; } int main() { MyClass*my[2]; int k; for(k=0;k<2;k++) my[k]=new MyClass; for(k=0;k<2;k++) delete my[k]; return 0; } 运行后的输出结果是()。

A.1210

B.1100

C.1234

D.输出结果不确定

点击查看答案
第8题
以下Java程序的运行结果是()。public class Increment{public static void main(String args[]

A. 222

B. 233

C. 223

D. 345

点击查看答案
第9题
有如下程序:#include<iostream>using namespqce Std;class TestClass{private;Char C;public;Tes

有如下程序: #include<iostream> using namespqce Std; class TestClass { private; Char C; public; TestClass(char n):c(n){} ~TestClass() { cout<<c; }; class TestClassl:public TestClass { private: Char C; public:

A.xy

B.yx

C.x

D.y

点击查看答案
第10题
有如下程序:#include<iostream.h>using namespace std;Class Base{public:Base(){cout<<“BB”;f()

有如下程序: #include<iostream.h> using namespace std; Class Base { public: Base(){cout<<“BB”;f();} void{(){cout<<“BF”;} }; class Derived:public Base { public: Derived(){cout<<“DD”;} void f(){cout<<“Df”;) }; int main

A.BBBfDD

B.BBDfDDDf

C.DD

D.DDBBBf

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改