单选题下列关于函数参数的叙述中,错误的是
单选题必须用一对大括号括起来的程序段是( )。
单选题下列叙述中正确的是( )。
单选题支持子程序调用的数据结构是
单选题下列关于成员函数特征的描述中,错误的是( )。
单选题派生类的成员函数不能访问基类的( )。
单选题设有下列二叉树: 对此二叉树前序遍历的结果为A)ZBTYCPXAB)ATBZXCYPC)ZBTACYXPD)ATBZXCPY
单选题最简单的交换排序方法是
____
。
单选题下面程序错误的语句是 ①#include < iostream.h> ②void main( 0 ③ ④ int * p = new int[1] ; ⑤ p =9; ⑥ cout <<*p <<end1; ⑦ delete [ ] p; ⑧
单选题下列说法中错误的是( )。 A.公有继承时基类中的public成员在派生类中仍是public成员 B.公有继承时基类中的private成员在派生类中仍是private成员 C.私有继承时基类中的public成员在派生类中是private成员 D.保护继承时基类中的public成员在派生类中是protected成员
单选题要定义数组A,使得其中每个元素的数据依次为:3、9、4、8、0、0、0,错误的定义语句是( )。 A.int A[]=3,9,4,8,0,0,0; B.int A[9]=3,9,4,8,0,0,0; C.int A[]=3,9,4,8; D.int A[7]=3,9,4,8;
单选题有如下程序: #include<iostream> using narnespace std; classA { public: A(){cout<<''A'';} }; class B { public:B(){cout<<''B'';}}; class C:public A { B b; public: C0{cout<<''C'';} }; intmain(){C obj;return 0;} 执行后的输出结果是( )。
单选题有如下类定义: class Test { char a;const char b; public: Test(char c){a=c;b=c;} //第1行 void f(char a)const{this->a=a;} //第2行 void g(char b){this->b=b;} //第3行 char h() const{return a;} //第4行 }; 编译时没有错误的行是( )。
单选题有如下程序: #include<iomanip>
#include<iostream> using namespace std; int
main(){ cout<<setfill('*')<<setw(6)<<123<<456;
return 0; } 运行时的输出结果是{{U}} {{/U}}。
A. ***123***456
B. ***123456***
C. ***123456
D. 123456
单选题一个栈的初始状态为空。现将元素1,2,3,A,B,C依次入栈,然后再依次出栈,则元素出栈的顺序是
单选题以下定义:int(*p)[4]中,标识符p是( )。
单选题多态性指的是 A)以任何方式调用一个虚函数 B)以任何方式调用一个纯虚函数 C)借助于指向对象的基类指针或引用调用一个虚函数 D)借助于指向对象的基类指针或引用调用一个纯虚函数
单选题在关系代数运算中,有5种基本运算,它们是( )。
单选题有如下程序: #include<iostrcam> using namespace std; class AA{ int n; public: AA(int k):n(k){} int get() { return n;} int get()const{return n+1;} }; int main() { AA a(5); const AA b(6); cout<<a.get()<<b.get() return 0: } 执行后的输出结果是( )。
单选题有以下程序: class Date public: Date(int y,int m,int D) ; year =y; month=m; day=d; Date(int y=2000) year=y; month=10; day=1; Date(Date &D) year=d.year; month=d.month; day=d.day; void print () cout<<year<<"."<<month<<"."<<day<<end1; private: int year,month,day; ; Date fun(Date D) Date temp; temp=d; return temp; int main() Date date1(2000,1,1),date2(0,0,0); Date date3(date1); date2=fun(date3); return 0; 程序执行时,Date类的拷贝构造函数被调用的次数是
