单选题当循环队列非空且队尾指针等于队头指针时,说明循环队列已满,不能进行入队运算。这种情况称为( )。 A) 下溢 B) 上溢 C) 异常 D) 溢出
单选题如下程序的输出结果是 #include<iostream> using namespace std; class A{ public: A( ){cout<<"A";} }; class B{public:B( ){cout<<"B";}}; class C:public A{ B b; public: C( ){cout<<"C";} }; int main( ){C obj;return 0;}
单选题下面叙述中错误的是( )。
单选题有如下类定义: class MyClass{ int value; public: MyClass(int n):value(n){} int getValue()const{return value;} }; 则类MyClass的构造函数的个数是( )。
单选题下列变量名中,______ 是合法的。
单选题一个向量第1个元素的存储地址是100,每个元素的长度为2,则第5个元素的地址是( )。
单选题下列关于输入流类成员函数getline()的描述中,错误的是( )。
单选题数据库系统的基础是( )。 A.数据库技术 B.数据库分析 C.数据库开发 D.数据库管理系统
单选题下列符号中不属于C++关键字的是( )。
单选题有如下程序:
#include<iostream>
using namespace std;
class Music {
public:
void setTitle(char*str) {strcpy(title, str);}
protected:
char type[10];
private:
char title[20];
};
class Jazz: public Music {
public:
void set(char*str) {
strcpy(type, "Jazz");//①
strcpy(title, str);//②
}
};
下列叙述中正确的是______。
单选题语句while(!E)中的表达式!E等价于
____
。
单选题有如下程序: #include<iostream> using namespace std; int main() { void function(double val); double val; function(val); cout<<val; return 0; } void function(double val) { val=3; } 编译运行这个程序将出现的情况是( )。
单选题有如下程序: #include < iostream > using namespace std; int i = 1 ; class Fun public : static int i; int value() return i - 1; int value() const return i + 1 ; ; int Fun: :i =2; int main() int i =3; Fun fun1 ; const Fun fun2; ______ return 0 ; 若程序的输出结果是: 123 则程序中下划线处遗漏的语句是( )。 A) cout << fun1. value() <<Fun: :i << fun2. value() ; B) cout << Fun : : i << fun1. value () << fun2. value () ; C) cout << fun1. value () << fun2. value () << Fun : : i ; D) cout << fun2. value() <<Fun: :i << fun1 value() ;
单选题有如下程序:
#include
using namespace std;
int main()
{int*p;
*p=9;
cout<<“The value at p:”<<*p;
return 0:
}
编译运行程序将出现的情况是( )。
单选题以下程序执行后的输出结果是( )。 #include
<iostream> using namespace 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; }
A. 18
B. 9
C. 10
D. 不确定
单选题定义如下枚举类型enum{Monday,Tuesday,Wednesday,Thrusday,Friday=2);则下列选项正确的是( )。
A.表达式wednesday==Friday的值是true
B.Day day;day=3;
C.Day day;day=Monday+3;
D.Day day;day=Tuesday+10;
单选题下列函数的功能是判断字符串str是否对称,对称则返回true,否则返回false,则横线处应填上( )。 Bool fun(ehar*str) { int i=0,i=0; while(strD])j++; for([j--;i
单选题通过派生类的对象可直接访问其( )。
单选题下列关于抽象类的表述中正确的是( )。