首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下类声明: class XA { int x;public: XA(int n) { x=n;}};class XB: public XA{ int y;public: XB(int a, int b);};在
有如下类声明: class XA { int x;public: XA(int n) { x=n;}};class XB: public XA{ int y;public: XB(int a, int b);};在
admin
2009-01-15
51
问题
有如下类声明: class XA { int x;public: XA(int n) { x=n;}};class XB: public XA{ int y;public: XB(int a, int b);};在构造函数朋的下列定义中,正确的是( )。
选项
A、XB::XB(int a,int b): x(a),y(b){}
B、XB::XB (int a,int b):XA(a),y(b){}
C、XB::XB(int a,int b): x(a),XB(b){}
D、XB::XB(int a,int b):XA(a),XB(b){}
答案
2
解析
转载请注明原文地址:https://www.kaotiyun.com/show/m5kp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
以下选项中可用作C程序合法实数的是
设有定义:struct{charmark[12];intnuml;doublenum2;}tl,t2;若变量均已正确赋初值,则以下语句中错误的是
有以下程序#includemain(){inta=1,b=0;printf("%d,",b=a+b);printf("%d\n",a=:2*b);}程序运行后的输出结果是
有以下程序#includeintadd(inta,intb){return(a+b);}main(){intk,(*f)(),a=5,b=10;f=add;…}则以下函数调用语句错误的是()。
下列定义变量的语句中错误的是
以下选项中,能用作用户标识符的是()。
若有如下说明,且int类型占两个字节,则正确的叙述为()。structstfinta;intb[2];}a;
设二叉树的前序序列与中序序列均为ABCDEFGH,则该二叉树的后序序列为
有以下结构体说明、变量定义和赋值语句structSTD{charname[10];intage;charsex;}s[5],*ps;ps=&s[0];则以下scanf函数调用语句有错误的是
设文件指针fp已定义,执行语句fp=fopen("file","w");后,以下针对文本文件file操作叙述的选项中正确的是
随机试题
起重机司索工在吊装作业前,应估算吊物的质量和重心,以免吊装过程中吊具失效导致事故。根据安全操作要求,如果目测估算,所选吊具的承载能力应为估算吊物质量的()。
七叶苷试验用于D群链球菌与其他链球菌的鉴别,该试验阳性的细菌是
女,15岁,胸外伤致血气胸,行胸腔闭式引流术后,考虑拔管应除外()
下列各选项关于完全垄断市场的表述,正确的有()。
《中华人民共和国国家赔偿法》规定,中级以上人民法院设立赔偿委员会,由人民法院()审判员组成。
Ifwedefinecurrentsavingsbyconsumersasthedifferencebetweentheircurrentincomeandtheirconsumption,aparticulargro
Yesterdaythemanagerinsistedthatthecontract______signedassoonaspossible.
A、people’sgreaterconfidenceonthegovernmentB、lightertensionbetweenSunniandShiiteC、sympathyforSaddamD、people’smore
Theministerofforeignaffairsmadeastatement______hehasexcludedthepossibilityofbeinginvolvedintheGulfconflicts.
Singaporeisoneoftheworld’ssmallestcountriesbutitisalsooneofthemostsuccessfulcountries.Itseconomicgrowthhas
最新回复
(
0
)