选择题 在数据库系统的组织结构中,下列______映射把用户数据库与概念数据库联系了起来。
选择题 C++系统预定义了4个用于标准数据流的对象,下列选项中不属于此类对象的是______。
选择题 有如下类定义:
class Test{
char a;const char b;
public:
Test(char c){a=c;b=c;} //第1行
void f(char a)const{this->a=a;) //第2行
void g(char b){this->b=b;) //第3行
char h()const{return a;) //第4行
};
编译时没有错误的行是______。
选择题 派生类中的成员不能直接访问基类中的 成员。
选择题 若有以下程序:
#include<iostream>
usingnamespacestd;
voidsub(intx,inty,int*2)
{
*z=y+x;
}
int main()
{
int a,b,C;
sub(8,4,A) ;
sub(6,a,B) ;
sub(a,b,C) ;
cout<<a<<','<<b<<','<<c<<end1;
return 0;
}
程序运行后的输出结果是______
选择题 在数据库系统中,是数据库中全体数据的逻辑结构和特征的描述的数据模式为 。
选择题 在数据结构中,从逻辑上可以把数据结构分成 。
选择题 下列程序中画线处正确的语句是______。
#include <iostream>
using namespace std;
class Base
{
public:
void fun() {cout<<'Base:: fun'<<endl;}
};
class Derived: public Base
{
void fun()
{
______ //显式调用基类的函数fun()
cout<<'Derived:: fun'<<endl;
}
};
选择题 要定义整型数组x,使之包括初值为0的三个元素,下列语句中错误的是______。
选择题 若是对类BigNumber中重载的类型转换运算符long进行声明,下列选项中正确的是______。
选择题 如下程序的输出结果是
#include<iostream>
#include<iomanip>
using namespace std;
class CSum{
int x,y;
public:
CSum(int x0,int y0):X(x0),y(y0){ }
friend ostreamamp; operator<<(ostreamamp; os,const CSumamp; xA) {
os<<setw(5)<<xa.x+xa.y:
return os;
}
};
int main( ){
CSum y(3,5);
cout<<setfill('*')<<8;
cout<<y;
return 0;
}
选择题 C++中的类有两种用法:一种是类的实例化,即生成类的对象,并参与系统的运行,另一种是通过 派生出新的类。
选择题 设有关键码序列(16,9,4,25,15,2,13,18,17,5,8,24),要按关键码值递增的次序排序,采用初始增量为4的希尔排序法,一趟扫描后的结果为 。
选择题 下面有关for循环的正确描述是______。
选择题 若已定义:
int a[]={0,1,2,3,4,5,6,7,8,9},*p=a,i;
其中0≤i≤9,则对a数组元素不正确的引用是______。
选择题 有如下程序:
#include<iostream>
using namespace std;
class Pair{
int m,n;
public;
Pair(int j,int k):m(j),n(k){}
int get(){return m;}
int get() const{return m+n;}
);
int main() {
Pair a(3,5);
corist Pair b(3,5);
cout<<a.get()<<b.get();
return 0;
}
运行时的输出结果是______。
选择题 Sample是一个类,执行下面语句后,调用Sample类的构造函数的次数是______。
Sample a[2].*p=new Sample;
选择题 有以下程序:
#include <iostream>
#include <fstream>
using namespace std;
int main ( )
{
ofstream ofile;
char ch;
ofile.open ('abc.txt');
cin>>ch;
while (ch!='#' )
{
cin>>ch;
ofile.put(ch);
}
ofile.close();
return 0;
}
当从键盘终端连续输入的字符为a、b、c和#时,文件abc.txt中的内容为 。
选择题 有如下程序:
classBase{
public:
int data:
};
class Derived1:public Base{};
class Derived2:protected Base{};
int main(){
Derived1 d1;
Derived2 d2;
d1.data=0; //①
d2.data=0; //②
return 0;
}
下列关于程序编译结果的描述中,正确的是______。
选择题 数据库管理系统是______。