首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下类定义: 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
2021-05-06
24
问题
有如下类定义:
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://jikaoti.com/ti/Jnh0FFFM
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
有如下程序:#includeusingnamespacestd;classA{public:A(inti):r1(i){}voidprint(){cout
字面常量42、4.2、42L的数据类型分别是()。
下列关于类定义的说法中,正确的是()。
以下()不属于对象的基本特征。
下面是关于派生类声明的开始部分,其中正确的是()。
语句int*p=&k;定义了指针p,与这个语句等效的语句序列是()。
在类中重载赋值运算符时,应将其声明为类的()。
建立一个有成员对象的派生类对象时,各构造函数体的执行次序为()。
下列关于类定义的说法中,正确的是()。
以下描述中,不是线性表顺序存储结构特征的是()。
随机试题
患者,女性,32岁。慢性迁延性胃炎。反复上腹胀痛,食欲减退,反酸、嗳气。近半年,出现贫血、体重减轻。该患者进行实验室检查,可能出现的结果是
入院后,休息时再次出现胸骨后闷痛,ECG显示ST段抬高,应首选的抗心绞痛药是
患者,28岁。人流术后42天,下腹坠痛2天,不伴发热,检查:子宫增大,触痛明显。可能的诊断是
A.泻痢浮肿,腰腹冷痛,伴见虚寒之象B.腰膝酸软,胁痛,耳鸣遗精,眩晕,伴见虚热之象C.胸胁、胃脘胀痛,或窜痛,呃逆嗳气D.心悸怔忡,肢体浮肿,伴见虚寒之象E.心悸失眠,食少腹胀,慢性出血,伴见气血亏虚之象
市场失灵主要表现在()。
下列属于会议记录的内容的是()。
给定资料1.政府公信力是政府依据自身的信用所获得的社会公众的信任程度,是社会组织和民众对政府信誉的一种主观价值判断,是政府实施行政行为时的形象和所产生的信誉在社会组织和民众中形成的心理反应。一句话,政府公信力是政府的影响力与号召力,体现的是政府的
下列描述中正确的是
YouwillhearaninterviewaboutGalapagosAdventureTourinEcuador.Asyoulisten,youmustanswerQuestions21to30bywriti
CampingOnekindofvacationthatmanyAmericansenjoyiscamping./EachsummermillionsofAmericansdrivetothecountrys
最新回复
(
0
)