首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列代码段声明了3个类:class Person();class Student:public Person{};class Undergraduate:Student{};下列关于这些类之间关系的描述中,错误的是( )。
下列代码段声明了3个类:class Person();class Student:public Person{};class Undergraduate:Student{};下列关于这些类之间关系的描述中,错误的是( )。
admin
2013-05-30
54
问题
下列代码段声明了3个类:class Person();class Student:public Person{};class Undergraduate:Student{};下列关于这些类之间关系的描述中,错误的是( )。
选项
A、类Person是类Undergraduate的基类
B、类Undergraduate从类Student公有继承
C、类Student是类Person的派生类
D、类Undergraduate是类Person的派生类
答案
B
解析
类Undergraduate从类Student私有继承,继承方式缺省则默认是Private。
转载请注明原文地址:https://www.kaotiyun.com/show/q6Np777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
下列叙述中正确的是()。
软件开发离不开系统环境资源的支持,其中必要的测试数据属于()。
若有如下程序:#include<iostream>usingnamespacesstd;ints=0;classsample{staticintn;public:sample(inti){n=i;}staticvoidadd(){
有如下类定义;classAA{inta;public:intgetRef()const{return&a;}//①intgetValue()const{returna;}//②voidset(intn)const{a=n
设有定义语句:inta=12;,则表达式a*=2+3的运算结果是【】。
下面程序的运行结果是()。#include<iostream>usingnamespacestd;classA{public:virtual~A(){cout<<
下列描述中错误的是()。
下列关于构造函数的描述中,错误的是()。
在表达式x+y*z中,+是作为成员函数重载的运算符,*是作为非成员函数重载的运算符。下列叙述中正确的是______。
在一棵二叉树中,第5层的节点数最多为()。
随机试题
关于急性坏死性肠炎的叙述,正确的是()
免疫系统包括
A真武汤B半夏泻心汤C黄土汤D定喘汤E小青龙汤附子、黄芩同用的方剂是
大量饮水导致抗利尿激素减少从而减少水的重吸收,所以尿量增多。()
《中华人民共和国土地管理法》规定,土地按用途分为()。
下列关于生物与地理环境关系的叙述,正确的是()。
纯公共物品的需求曲线以个人需求曲线的()方向加总求得。
在表结构为(职工号,姓名,工资)的表Employee中查询职工号的第5位开始的4个字符为"0426"职工情况,正确的SQL命令是
VibratingRubberCellphonesVibratingrubbercellphonescouldbethenextbigthinginmobilecommunications.Theyallowpeo
InthewintermonthsthetemperatureinmostofCanadausuallystaysbelow0℃.However,insomepartsofCanada,suchassouther
最新回复
(
0
)