单选题己知类MyClass声明如下:
class MyClass{
int n;
public:
MyClass(int k):n(k){)
int getValue()const{ return n; }
};
在下列数组定义中正确的是______。
单选题假定有下列变量定义: int k=7,x=12; 则能使值为0的表达式是
单选题下列关于严格控制goto语句使用的理解中,错误的是( )。
单选题通常的拷贝初始化构造函数的参数是( )。
单选题C++系统预定义了4个用于标准数据流的对象,下列选项中不属于此类对象的是______。
单选题下列函数原型声明中,错误的是( )。
单选题有三个关系R、S和T如下:则由关系R和S得到关系T的操作是______。
单选题在下列横线处应添加的语句是( )。 class Base{public:voidfun0{cout<<"Base::fun"<<endl;}}; class Derived:public Base { public: void fun() { //显示调用基类的fun函数 cout<<"Derived::fun"<<endl; } };
单选题下列程序的输出结果是 #include<iostream.h> class Myclass public:Myclass(int i=0,int j=0) x=i; y=j; void show( ) cout < <"x=" < < x < <" " <"y=" < < y < < endl; void show( ) constcout < <"x=" < <" " < <"y=" < < y < < endl; privated: int x; int y; ; void main( ) Myclass my1(3,4) ; const my2(7,8) ; my1.show( ) ;my2.show( ) ; A) x=4,y=3;x=7,y=8 B) x=3,y=4;x=7,y=8 C) x=7,y=8;x=4,y=3 D) x=8,y=7;x=7,y=8
单选题以下关键字用来声明类的访问权限的是
单选题要建立文件流并打开当前目录下的文件file.dat用于输入,下列语句中错误的是( )。
单选题下列对于软件测试的描述中正确的是( )。
单选题包容类Contain和内嵌类Embed定义如下:
#include<iostream.h>
class Contain
{
private:
int X;
protected:
int z;
public:
class Embed
{
private:
int y;
public:
Embed(){y=100;}
int Embed_Fun();
}MyEmbed;
int Contain_Fun();
};
对上面的定义,正确的描述是
____
。
单选题执行语句char a[10]={“abcd”},*p=a;后,*(p+4)的值是 ______。
单选题下面函数调用语句含有实参的个数为( )。func(( exp1,exp2),(exp3,exp4,exp5));
单选题在下列程序画线处填入的正确语句是( )。 #include <iostream> using namespace std; class Base public: void fun() cout<<"Base::fun",<<end1; ; class Derived:public Base void fun() ______________ //显式调用基类的函数fun() cout<<"Derived::fun" <<end1; ; A) fun(); B) Base.fun(); C) Base::fun(); D) Base->fun();
单选题设有定义: class person int num; char name[10]; public: void init(int n,char *m); ; person std[30] 则以下叙述不正确的是( )。
单选题下面 ______ 是正确的递归函数,它保证对所有的参数能够结束。
单选题下列选项中,错误的C++表达式是______。
单选题程序调试的任务是( )。