首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下类声明: class TestClass { inti; private:intj; protected:int k; public:int m,n; }; 其中,私有成员的数量为___
有如下类声明: class TestClass { inti; private:intj; protected:int k; public:int m,n; }; 其中,私有成员的数量为___
admin
2012-12-29
30
问题
有如下类声明:
class TestClass
{
inti;
private:intj;
protected:int k;
public:int m,n;
};
其中,私有成员的数量为__________。
选项
答案
2
解析
首先声明为privace的“pfivate:int j;”中j为私有成员。然后在类中没有指定,系统默认为私有。即“int i:”中的i也是私有成员。所以本题中的私有成员数量为2。
转载请注明原文地址:https://kaotiyun.com/show/N5Vp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
下列二叉树描述中,正确的是()。
学生的记录由学号和成绩组成,N名学生的数据已放入主函数中的结构体数组s中,请编写函数fun,其功能是:把分数最高的学生数据放在b所指的数组中。注意:分数最高的学生可能不止一个,函数返回分数最高的学生人数。注意:部分源程序给出如下。请勿改动主函数main
以下叙述中错误的是()。
某系统结构图如下图所示(图中n≥5) 该系统结构图的宽度是()。
以下选项中,合法的一组C语言数值常量是()。
在进行逻辑设计时,将E-R图中实体之间联系转换为关系数据库的()。
在长度为n的顺序表中查找一个元素,假设需要查找的元素一定在表中,并且元素出现在表中每个位置上的可能性是相同的,则在平均情况下需要比较的次数为()。
将数据和操作置于对象统一体中的实现方式是()。
在结构化方法中,用数据流程图(DFD)作为描述工具的软件开发阶段是
关于在调用模板函数时模板实参的使用,下列表述正确的是
随机试题
下列关于嗜铬细胞瘤的说法不正确的是
最重要的吸气肌是
客源的特征包括()。
一对新上海人夫妇,年纪轻轻,却已经在本职工作之外开了家自己的公司,收入颇为丰厚。为了使资产保值增值,给宝宝打下更好的经济基础,为了给父母买房尽尽孝心,他们该如何理财才能实现愿望呢?一、案例成员二、家庭收支情况收入方面:1.吴女士每月的税后收入有1
为了体现国家有关政策,《企业所得税暂行条例》规定的减免优惠有( )。
下面不是群体决策技术的是()。
(2009年考试真题)下列各项中,属于筹资活动现金流量的有()。
试述中国居民膳食平衡宝塔
公安机关行使刑事案件立案权的法律根据是()的有关规定。
【B1】【B15】
最新回复
(
0
)