在我国,Time Base(时基)的值为()。
第1题:
下列程序中画线处应填入的语句是
class Base
{
public:
void fun(){cout <<”Base of fun”<
};
class Derived:public Base
{
void fun()
{
//显示基类的成员函数fun
cout <<”Derived of fun”<
};
A.fun();
B.Base. fun();
C.Base::fun();
D.Base- >fun-:
第2题:
在我国,timeline(时基)的值是25帧。()
第3题:
在下面的程序的横线处填上适当的语句,使该程序的输出为12。
include<iostream.h>
using namespace std;
class Base
{
public:
int a,b;
Base(int i){a=i;}
};
class Derived:public Base
{
int a;
public:
Derived(int x):Base(x),b(x+1){};
void show()
{
______;//输出基类数据成员a的值
cout<<b<<endl;
}
};
int main()
{
Derived d(1);
d.show();
return 0;
第4题:
请将下列类定义补充完整。
class Base{public:void fun(){cout<<"Base::fun"<<end;}};
class Derived:public Base
{
public:
void fun()
{
【 】//显式调用基类的fun函数
cout<<"Derived::fun"<<endl;
}
};
第5题:
使用VC6打开考生文件夹下的工程test2_1,此工程包含一个源程序文件test2_1.cpp,但该程序运行有问题,请改正程序中的错误,使该程序的输出结果如下:
调用基类BASE的构造函数:1
调用基类BASE的构造函数:2
调用派生类A的构造函数:3
调用派生类A的析构函数
调用基类BASE的析构函数
调用基类BASE的析构函数
源程序文什test2_1.cpp清单如下:
include<iostream.h>
class BASE
{
public:
BASE(int i){cout<<"调用基类BASE的构造函数:"<<i<<endl;}
~BASE(){cout<<"调用基类BASE的析构函数"<<endl;)
/***************** found *****************/
}
class A:public BASE
{
public:
/***************** found *****************/
A(int a,int b):i(a),b(b)
{cout<<"调用派生类A的构造函数:"<<a+b<<endl;}
~A(){cout<<"调用派生类A的析构函数"<<endl;)
private:
BASE b;
};
void main()
{
/****************found***************/
BASE obj(1,2);
}
第6题:
请将下列类定义补充完整。
class Base{public:void fun(){tout<<"Base::fun"<<endl;}};
class Derived:public Base
{
public:
void fun()
{
______//显示调用基类的fun函数
cout<<"Derived::fun"<<endl;
};
第7题:
听力原文:M: The rate on a personal loan is fixed according to the base rate at the time when the loan is made.
W: But it is always higher than the base rate, isn't it?
Q: What is determined when a personal loan is made?
(14)
A.Rate on the personal loan.
B.Base rate of the bank.
C.The amount of payment.
D.Personal loan's time period.
第8题:
下列程序中划线处正确的语句是( )。 # include <iostream> using namespace std; class Base { public: void fun(){cout<<"Base:: fun" <<endl;} }; class Derived:public Base { void fun() { ______ ∥显式调用基类的函数fun() cout<<"D
A.fun();
B.Base.fun();
C.Base::fun();
D.Base- >fun();
第9题:
在下面的程序的横线处填上适当的语句,使该程序的输出为12。
include 〈iostream〉
using namespace std;
class Base
{
public:
int a;
Base(int i) { a=i;}
};
class Derived : public Base
{
int a;
public:
Derived(int x) : Base(x),b(x+1) {}
void show()
{
【 】; //输出基类数据成员a的值
cout〈〈b〈〈end1;
}
};
int main()
{
Derived d(1);
d.show();
return 0;
}
第10题:
若二维数组P[1..5,0..8]的首地址为base,数组元素按行存储,且每个元素占用1个存储单元,则元素P[3,3]在该数组空间的地址为(32)。
A.base+13
B.base+16
C.base+18
D.base+21