首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下类定义: class Pass{ static int count; public: Pass(){} void show()const; friend in
有如下类定义: class Pass{ static int count; public: Pass(){} void show()const; friend in
admin
2015-07-22
22
问题
有如下类定义:
class Pass{
static int count;
public:
Pass(){}
void show()const;
friend int getCount();
static int incre();
};
在所声明的 4 个函数中,具有 this 指针的有
选项
A、Pass 和 show
B、Pass 和 show
C、show 和 incre
D、getCount 和 incre
答案
A
解析
C++的类定义中,只有非静态成员函数具有this指针,Pass类中getCount()函数是友元函数,不属于成员函数,没有this指针,选项B、D错误;incre()函数是静态成员函数,没有this指针,选项C错误;答案为A。
转载请注明原文地址:https://kaotiyun.com/show/Z8Np777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
下列对派生类的描述中,错误的是
下列叙述中正确的是
下面是复数类complex的定义,其中作为友元函数重载的运算符“--”的功能是将参数对象的实部减1,然后返回对该对象的引用:请补充完整。classcomplex{private:intreal;int
当使用fstream流类定义一个流对象并打开一个磁盘文件时,文件的隐含打开方式为
类的析构函数的作用是
下列有关内联函数的叙述中,正确的是
在长度为64的有序线性表中进行顺序查找,最坏情况下需要比较的次数为
对下列二叉树进行中序遍历的结果为【 】。
下列语句中错误的是( )。
下列是模板声明的开始部分,其中正确的是______。
随机试题
在建立良好的师生关系的过程中起决定性作用的是( )。
下列关于居住区内绿地面积计算的叙述,错误的是()。
某城市的一家公司,实际占地23000平方米。由于经营规模扩大,年初该公司又受让了一块尚未办理土地使用证的土地3000平方米,公司按其当年开发使用的2000平方米土地面积进行申报纳税,以上土地均适用每平方米2元的城镇土地使用税税率。该公司当年应缴纳城镇
商业银行存在下列情形的,由中国人民银行责令改正,但不包括()。
某零件投产批量为4件,经过5道工序加工,单件每道工序作业时间依次为20分钟、10分钟、20分钟、20分钟、15分钟。根据上述资料,回答下列问题:将一个批次的该零件全部生产出来用时必须小于200分钟,应采用的零件移动方式有()。
一般资料:求助者,男性,30岁,硕士。案例介绍:求助者为某单位科研人员,一个多月前,因工作失误与领导发生冲突,领导说他幼稚,让他写检查。求助者觉得自己没错,不愿写。求助者认为领导霸道,自己无法与之相处,却又想不出解决办法,每天为自己的处境烦恼,经常失眠
1,3,7,15,( )。
TravelmedicineinBritainis________.Onebigobstacletothedevelopmentoftravelmedicineis________.
下列对VLAN的描述中,错误的是()。
HowtoWriteaResearchReportAstandardformatwillhelpreaderstolocatetheinformationtheywantquickly.Itistruethat
最新回复
(
0
)