题目内容

判断char型变量c是否为小写字母的正确表达式是( )。

A. ’a’<=c<=’z’
B. (c>=A.&&(c<=z)
C. (’a’>=C.||(’z’<=C.
D. (c>=’a’)&&(c<=,z,)

查看答案
更多问题

决定c++语言中函数的返回值类型的是( )。

A. return语句中的表达式类型
B. 调用该函数时系统随机产生的类型
C. 调用该函数时的主调用函数类型
D. 在定义该函数时所指定的数据类型

请使用VC6或使用【答题】菜单打开考生文件夹projl下的工程projl。程序中位于每个“//ERROR****found料****之后的一行语句有错误,请加以改正。改正后程序的输出结果应为: Name:Smith Age:21 ID:99999 CourseNum:12Record:970注意:只修改每个“//ERROR****found****”下的那一行,不要改动程序中的其他内容。 #includeusing namespace std; class Studentlnfo{protected: //ERROR********************found****************char Name; int Age; int ID: int CourseNum; float Record; public: Studentlnfo(char*name,int Age,int ID,int coumeNum,float record); //ERROR ********************found********************void~Studentlnfo(){}float AverageRecord(){return Record/CourseNum; }void show()const{cout

对类的构造函数和析构函数描述正确的是( )。

A. 构造函数可以重载,析构函数不能重载
B. 构造函数不能重载,析构函数可以重载
C. 构造函数可以重载,析构函数也可以重载
D. 构造函数不能重载,析构函数也不能重裁

有如下类声明: class Base{protected: int amount; public: Base(int n=0):amount(n){}int getAmount()const{retum amount;}}; class Derived:public Base{protected: int value; public: Derived(int m,int n):value(m),Base(n){}int getData()const{return value+amount;}}: 已知x是一个Derived对象,则下列表达式中正确的是( )。

A. x.value+X.getAmount()
B. x.getData()一x.getAmount()
C. x.getData()一x.amount
D. x.value+X.amount

答案查题题库