首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列代码段中声明了3个类: class Person{}; class Student:public Person{}; class Undergraduate:Student i}; 下列关于这些类之间关系的描述中,错误的
下列代码段中声明了3个类: class Person{}; class Student:public Person{}; class Undergraduate:Student i}; 下列关于这些类之间关系的描述中,错误的
admin
2021-06-10
67
问题
下列代码段中声明了3个类:
class Person{};
class Student:public Person{};
class Undergraduate:Student i};
下列关于这些类之间关系的描述中,错误的是( )。
选项
A、类Person是类Undergraduate的基类
B、类Undergraduate从类Student公有继承
C、类Student是类Person的派生类
D、类Undergraduate是类Person的派生类
答案
B
解析
本题考查基类和派生类的逻辑关系,属于基础知识,如果没有指明哪种继承方式,那么默认为私有继承,所以B选项错误。
转载请注明原文地址:https://kaotiyun.com/show/bAfp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
在数据库设计中,将E一R图转换成关系数据模型的过程属于()。
下列定义语句中,错误的是()。
有如下程序:classBase{public:intdata;};classDerivedl:publicBase{};classDerived2:protectedBase{};
下面不属于软件设计原则的是()。
如下函数的作用是以双倍行距输出文件:voiddouble_space(ifstream&f,ofstream&t){charC;whilc(_____){;_____if(c==’\n’)t.put(c
在数据库设计中,将E-R图转换成关系数据模型的过程属于
下列语句都是程序运行时的第1条输出语句,其中一条语句的输出效果与其他三条语句不同,该语句是()。
一个教师可讲授多门课程,一门课程可由多个教师讲授。则实体教师和课程间的联系是( )。
已知int型变量y的初值是5,但在执行语句"f(y);"后,y的值被改变,因此该语句所调用函数的原型是
如果有以下定义及初始化:inta=3,*p=&a:则由此可以推断,*p的值是()。
随机试题
∫—11(x5+x2)dx=________.
《动物防疫条件审查办法》规定动物饲养场之间的距离应不少于
某男,50岁。咳喘多年,胸闷痰多,痰稀白滑易咯出,舌苔白腻,脉滑。临床辨证为
A.发热、高血压、急性结膜炎B.呃逆、荨麻疹、皮肤瘙痒症C.胃肠痉挛、心绞痛、胆绞痛D.腹泻、痛经、失眠E.盆腔炎、附件炎、痛经耳穴“耳尖”的主治病证是
城市干道网的结构类型为()。
工程造价中多次性计价的流程是()。
Ahundredyearsagoitwasassumedandscientifically"proved"byeconomiststhatthelawsofsocietymakeitnecessarytohave
(46)TheEnglishlanguageisbeingdestroyedbya"deadlyvirusofmanagement-speak"whichhasinfectedthemouthsandmindsofp
Atwhattimedoestheofficeopen?
DistanceLearninginBritainIntimesofinflation,smartinvestorslookforasafehaven.So,withuniversitiescomplaining
最新回复
(
0
)