选择题 当使用fstream流类定义一个流对象并打开一个磁盘文件时,文件的隐含打开方式为______
选择题 下列选项中,正确的C++表达式是______。
选择题 在一个无向图中,所有顶点的度数之和等于所有边数的 倍。
选择题 有如下程序:
class Base {
public:
int data;
};
class Derivedl: public Base {};
class Derived2: protected Base {};
int main()
{
Derivedl d1;
Derived2 d2;
d1. data=0;//①
d2. data=0;//②
return 0;
}
下列关于程序编译结果的描述中,正确的是______。
选择题 有如下程序;
#include<iostream>
using namespace std;
clas Basel{
public:
Basel(int d){cout<<d;}
—Basel(){)
};
class Base2{
public:
Base2(int d){out<<d;}
~Base2(){}
};
class Derived:public Base1,Base2{
public:
Derived(int a,int b,int c,intd):
Base1(b),Base2(a),b1(d),b2(c){}
private:
int b1;
int b2;
};
int main(){
Derived d(1,2,3,4);
return 0;
}
运行时的输出结果是______。
选择题 下列错误的定义语句是 。
选择题 对于多重继承,下面说法中正确的是 。
选择题 以下程序执行后的输出结果是______
#include<iostream>
using namcspace std;
void try(int,int,int,int);
int main()
{
int x,y,z,r;
x=1;
y=2;
try(x,y,z,r);
cout<<r<<end1;
return 0;
}
void try(int x,int y, int z,int r)
{
z = x+y;
x = x*x;
y = y*y;
r = z+x+y;
}
选择题 有如下程序:
#include<iostream>
using namespace std;
class Con
{
char ID;
public;
Con():ID('A){cout<<1;}
Con(char ID):ID(ID){cout<<2;}
Con(Con&c):ID(c.getID()){cout<<3;}
char getID()const{return ID;}
}
void show(Con c){cout<<c.getID();}
int main()
{
Con c1;
sllow(c1);
Con c2('B');
show(c2);
return 0;
}
执行上面程序的输出结果是______。
选择题 数据库应用系统中的核心问题是______。
选择题 有下列程序:
#include <stdio.h>
void main()
{ char a=4;
printf('%d\n',a=a<<1);
}
程序的运行结果是______。
选择题 若语句:
cout<<seffill('>')<<setw(5)<<3141512<<sctw(5)<<'OK!';
是程序中第1个输出语句,则输出结果是 。
选择题 下列关于构造函数的描述中,错误的是______。
选择题 设函数中有整型变量n,为保证其在未赋初值的情况下初值为0,应选择的存储类别是______。
选择题 下列有关函数重载的叙述中,错误的是______。
选择题 如果类A被说明成类B的友元,则______。
选择题 若是对类BigNumber中重载的类型转换运算符long进行声明,下列选项中正确的是______。
选择题 一个非空广义表的表头 。
选择题 概念模型是 ______。
选择题 在语句cin>>data;中,cin是______。
