单选题在下列关键字中,不能用来表示继承方式的是( )。
单选题若有int(*p)[3]:则以下表述中正确的是 ______。
单选题定义派生类时,若不使用关键字显式地规定采用何种继承方式,则默认方式为
单选题对于语句cout < < setfill('*') < < setw(10) < < 1 < < setfill('*') < < setw(2) < < 2;的输出结果是 A) * * * * * * * * * 1 * 2 B) * * * * * * * * 12 C) * * * * * * * 1 * 2 D) 12 * * * * * * * *
单选题下列选项中,______不属于软件设计的基本原理。
单选题要利用C++流实现输入输出的各种格式控制,必须在程序中包含的头文件是______。 A.fstream B.istream C.ostream D.iomanip
单选题下列描述中,错误的是______。
单选题设有定义char str[80];以下不能将输入数据first/nsecond/n<CR>读取到数组str中的语句是______。
单选题有如下函数定义: void fune(int a,int&b){a++;b++;} 若执行代码段: int x=0,y=1; func(x,y); 则变量x和y的值分别是( )。
单选题在C++中,实现封装性需借助于( )。
单选题C++类体系中,不能被派生类继承的有
____
。
单选题设一棵满二叉树共有15个结点,则在该满二叉树中的叶子结点数为( )。
单选题有如下程序: #include<iostream> using namespace std; class A{ public: A(int i=0):r1(i){} void print(){cout<<'E'<<r1<<'-';} void print()const{cout<<'C'<<r1*r1<<'-';} void print(int x){cout<<'p'<<r1*r1*r1<<'-';} private: int r1; }; mt main(){ A a1; const A a2(4); a1.print(2); a2.print(); return 0; } 运行时的输出结果是( )。
单选题在C++语言中,形参的缺省存储类型是( )。
单选题有如下程序: #include < iostream > using
namespaee std; class Basel {
public : Basel(int d) { cout <<d;
} ~Basel () {} };
class Base2 { public :
Base2 ( int d) { cout << d ; }
~Base2() {} }; class Derived : public
Base1 ,Base2 { public :
Derived(int a, int b, int c, int d) :Base1(b), Base2(a), b1(d),
b2(e) {} private : int b1
; int b2 ; };
int main() { Derived d(1,2,3,4)
; return 0 ; }
执行这个程序的输出记过是{{U}} {{/U}}。
A. 1234
B. 2134
C. 12
D. 21
单选题下面程序的运行结果是 #include<iostream.h> class base{ protected: int a; public: base( ){cout<<"0";} }; class basel:virtual base { public: base1( ){cout<<"1";} }; class base2:virtual base{ public: base2( ){cout<<"2";} }; class derived:public base1,public base2{ public: derived( ){cout<<"3";} void main( ) { derived obj; cout < < end1; }
单选题对二叉树从1开始进行连续编号,要求每个结点的编号大于其左右孩子的编号,同一个结点的左右孩子中,其左孩子的编号小于其右孩子的编号,则可采用 ______ 遍历实现编号。 A) 无序 B) 中序 C) 后序 D) 从根开始的层次遍历
单选题下列关于基类和派生类关系的叙述中,正确的是( )。
单选题字符串常量"hello"的字符个数是{{U}} {{/U}}。
A. 3
B. 4
C. 5
D. 6
单选题一个类的友元函数或友元类能够通过成员操作符访问该类的______。