- A.ifstreamfin;fin.open("d:\\test.txt",iso_base::in);
- B.fstreamfi0;ri0.open("d:\\test.txt",is0_base::out);
- C.ofstream。fort;lout.open("d:\\test.txt",ios_base::out);
- D.ofstreamfout;fout.open("d:\\test.txt",is0_base::app);
- A.DB包括DBS和DBMS
- B.DBMS包括DB和DBS
- C.DBS包括DB和DBMS
- D.没有任务关系
- A.Fractionoperator+(Fraction,Fraction);
- B.Fractionoperator-(Fraction);
- C.Fraction&operator=(Fraction&,Fraction);
- D.Fraction&operator+=(Fraction&,Fraction):
- A.函数模板是一个实例函数
- B.使用函数模板定义的函数没有返回类型
- C.函数模板的类型参数与函数的参数相同
- D.通过使用不同的类型参数,可以从函数模板得到不同的实例函数
- a=i: } voiddisp( ) {
- cout<} };
- classTestClass2 { private:
- intb: public: TestClass2(intj) {
- b=j; } voiddisp() {
- cout<} };
- classTestClass3:publicTestClass2,publicTestClassl { private:
- intc; public: TestClass3(intk):TestClass1(k-2),TestClass2(k+2) {
- c=k: } voiddisp() { TestClasssl::disp(); TestClasss2::disp();
- cout<<c<<endl; } };
- A.构造函数
- B.抽象类
- C.派生类
- D.以上都不对
- A.break可以用于循环体内
- B.break语句可以在for循环语句中出现多次
- C.break语句可以在switch语句中出现多次
- D.break语句可用于if条件判断语句内
- A.MyClockoperator+(MyClock,long);
- B.MyClockoperator+(MyClock,MyCloek);
- C.MyCloekoperator+(long,long);
- D.MyClockoperator+(long,MyCloek):
- A.栈顶元素最先能被删除
- B.栈顶元素最后才能被删除
- C.栈底元素永远不能被删除
- D.以上三种说法都不对
- A.快速排序
- B.选择排序
- C.堆排序
- D.冒泡排序
- A.10
- B.16
- C.26
- D.36
- A.cout<<internal<<12345;
- B.cout<<left<<12345;
- C.cout<<right<<12345;
- D.cout<<setw(6)<<12345;
- A.类Person是类Undergraduate的基类
- B.类Undergraduate从类Student公有继承
- C.类Student是类Person的派生类
- D.类Undergraduate是类Person的派生类
- A.软件测试
- B.概要设计
- C.软件维护
- D.详细设计
- A.运算符重载为成员函数时,若参数表中无参数,重载的是一元运算符
- B.一元运算符只能作为成员函数重载
- C.二元运算符重载为非成员函数时,参数表中有一个参数
- D.C++中可以重载所有的运算符
- A.①和③
- B.①和④
- C.②和③
- D.②和④
- A.unsignedlongint和long
- B.signedshort和short
- C.unsignedshort和short
- D.shortint和int
- A.friendvoidf();
- B.friendvoidf(x<T>);
- C.friendvoidA::f();
- D.friendvoidC<T>::f(x<T>);
- A.1
- B.0
- C.非0的数
- D.-1
- A.enumtest{RED,YELLOW,BLUE,BLACK};
- B.enumtest{RED,YELLOW=4,BLUE,BLACK);
- C.enumtest{RED=-1,YELLOW,BLUE,BLACK};
- D.enumtest{RED,YELLOW=6,BLUE,BLACK);
- A.cout<<internal<<12345;
- B.tout<<left<<12345;
- C.cout<<right<<12345;
- D.tout<<setw(6)<<12345;
- A.o115
- B.o118
- C.1.5e1.5
- D.115L
- A.ACBDFEG
- B.ACBDFGE
- C.ABDCGEF
- D.FCADBEG
- A.纯虚函数是一种特殊的虚函数,它没有具体的实现
- B.抽象类是指具有纯虚函数的类
- C.一个基类声明了纯虚函数,该基类的派生类一定不是抽象类
- D.抽象类只能作为基类来使用,其纯虚函数的实现由派生类给出
- A.ofstreammyfile;myfile.open("d:ofile.txt");
- B.ofstream*myfile=newofstream;myfile->open("d:ofile.txt”);
- C.ofstreammyfile("d:ofile.txt");
- D.ofstream*myfile=new("d:ofile.txt");
- A.冒泡排序为n/2
- B.冒泡排序为n
- C.快速排序为n
- D.快速排序为n(n-1)/2
- A.ACBEDGFH
- B.ABDGCEHE
- C.HGFEDCBA
- D.ABCDEFGH
- A.自然连接
- B.交
- C.除
- D.并
- A.2009var
- B.goto
- C.test-2009
- D._123
- A.7
- B.8
- C.9
- D.10
- A.1
- B.2
- C.3
- D.4
- A.0
- B.1
- C.2
- D.3
- A.选择
- B.投影
- C.插入
- D.连接
- A.设置虚基类的目的是为了消除二义性
- B.虚基类的构造函数在非虚基类之后调用
- C.若同一层中包含多个虚基类,这些虚基类的构造函数按它们说明的次序调用
- D.若虚基类由非虚基类派生而来,则仍然先调用基类构造函数,再调用派生类的构造函数
- A.cin.get(str,strlen(str));
- B.cin.getline(str,strlen(str));
- C.cin>>str;
- D.cin.read(str,strlen(str));
- A.全局变量的作用域一定比局部变量的作用域范围大
- B.静态类别变量的生存期贯穿于整个程序的运行期间
- C.函数的形参都属于全局变量
- D.未在定义语句中赋初值的aut0变量和static变量的初值都是随机值
- A.软件测试应该由程序开发者来完成
- B.程序经调试后一般不需要再测试
- C.软件维护只包括对程序代码的维护
- D.以上三种说法都不对