选择题 下面是一个模板声明的开始部分:
templute<typename T>double
由此可知______。
选择题 下列重载函数中,正确的是 。
选择题 以下程序的结果是 。
#include<iostream.h>
void main()
{char * p='abcdefgh',*r;
long *q;
q=(long*)P;
q++;
r=(char*)q;
cout<<r<<endl;
选择题 有如下程序:
#qnclude<iostream>
#include<iomanip>
using namespace std;
class CSum
{ int x,y;
public:
CSum(int x0,int y0):x(x0),y(y0){}
friend ostream operator<<(ostreamos,const CSumxa)
{ os<<setw(5)<<Ka.k+xa.y;
return os;
}
};
int main(){
CSum y(3.5};
cout<<setfill('*')<<8
cout<<y;
return0;
}
执行上面程序的输出是
选择题 下面程序的运行结果是 。
#include<iostream.h>
void main()
{
int i=1;
while(i<=8)
if(++i%3!=2)continue;
else cout<<i;
}
选择题 一个满二叉树其深度为4,则其叶子节点的个数为 。
选择题 对长度为n的线性表进行顺序查找,在最坏情况下所需要的比较次数为______。
选择题 有如下两个类定义:
class XX{
private:
double x1;
protected:
double x2;
public:
double x3;
};
class YY:protected XX{
private:
double y1;
protected:
double y2;
public:
double y3;
};
在类YY中保护成员变量的个数是______。
选择题 若一个函数的原型为“int * Xfun1(int x.int y, char z);”,则该函数的返回值类型为______。
选择题 若要重载+、=、<<、=和[]运算符,则必须作为类成员重载的运算符是
选择题 while和do-while循环的主要区别是______
选择题 下列关于成员访问权限的描述中,不正确的是______。
选择题 数据库技术的根本目标是______。
选择题 有如下程序:
#include<iostream>
using namespqce std;
class TestClass
{
private;
char c;
public;
TestClass(char n):c(n){}
~TestClass()
{
cout<<c;
}
};
class TestClass1:public TestClass
{
private:
char c;
public:
TestClass1(char n):TestClass(n+1),c(n){}
~TestClass1()
{
cout<<c;
}
};
int main()
{
TestClass1 obj('x');
return 0;
}
执行上面的程序将输出______。
选择题 检查软件产品是否符合需求定义的过程称为______。
选择题 类A是类B的友元,类B是类C的友元,则下列说法正确的是______。
选择题 以下C++语言中用于单行注释的是______
选择题 在C++语言中,形参的缺省存储类型是 。
选择题 下列叙述中正确的是______。
选择题 下列对基类和派生类关系的描述中,错误的是 。
