首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下头文件: int n(); static im f2(); class MA{ public: int f3(); static int f4(); }; 在所描述的函数中,具有隐含的t
有如下头文件: int n(); static im f2(); class MA{ public: int f3(); static int f4(); }; 在所描述的函数中,具有隐含的t
admin
2020-07-23
22
问题
有如下头文件:
int n();
static im f2();
class MA{
public:
int f3();
static int f4();
};
在所描述的函数中,具有隐含的this指针的是( )。
选项
A、n
B、f2
C、f3
D、f4
答案
C
解析
只有类的非静态成员函数才隐含this指针,其作用域是类内部,当类的非静态成员函数中访问类的非静态成员时,编译器会自动将对象本身的地址作为一个隐含参数传递给函数,而不必一定写上this。所以本题答案为C。
转载请注明原文地址:https://kaotiyun.com/show/Q1yp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
有如下函数定义:voidfunc(inta,int&b){a++;b++;}若执行代码段:intx=0,y=1;func(x,y);则变量x和y的值分别是()。
对C++编译器区分重载函数无任何意义的信息是()。
有如下类声明和函数声明classBase{intm;public:intn;protected:intp;};classDer
若为类MyClass重载运算符"+",下列声明中,错误的是
有如下类定义:classPass{staticintcount;public:Pass(){}voidshow()const;friendin
将十进制数转换为二进制数的递归函数定义如下:voidd2b(unsignedintn){if((n==0)||(n==1))cout
下面叙述中错误的是( )。
设c1和c2是类MyClass的对象,若将运算符"+"和"*"作为类MyClass的成员函数重载,则表达式c1+c2*c1等价于
下列运算符中,不能被重载的是
下列符号中,正确的C++标识符是()。
随机试题
摩托车驶出隧道口处,遇横风引起摩托车偏离行驶路线时,应握稳转向把,微量进行调整。
A、白术B、人参C、甘草D、干姜E、茯苓四君子汤的君药是
A.麻醉药品B.精神药品C.毒性药品D.贵重药品E.普通药品其原料药属于医院一级管理的是
一名未接种过卡介苗的健康中年人,做结核菌素试验是阳性,下列解释不正确的是
患者,男,30岁。两天前因食不洁水果,出现腹痛腹泻,下痢赤白,里急后重,肛门灼热,心烦口渴,小便短赤,舌苔黄腻,脉滑数。治疗除取主穴外,还应加( )。
患者,男,60岁。在连续硬膜外麻醉下行腹股沟疝修补术,硬膜外置管后即给予1%利多卡因和0.2%地卡因混合液(含肾上腺素)8ml,数分钟后病人心跳、呼吸骤停。最可能的原因是什么?
下列选项中不属于教师享有的权利的是()。
教育上“谁受益、谁出钱”这一提法如果是正确的话,只能理解为国家是教育的最大受益者。这是因为一方面,教育的经济效益,虽然不能直接、立即体现在市场经济交换过程中,却存在于社会之中:另一方面,教育不仅有经济效益,而且是国家综合国力的重要组成部分。因此()
2018年N省规模以上工业增加值比上年增加7.1%,增速比上年提高4.0个百分点。其中,新产品增长强劲。石墨及碳素制品增长42.8%,单晶硅增长1.2倍,多晶硅增长47.1%,汽车增长26.6%。1—11月,N省规模以上工业企业实现利润总额达到1
通常所说的“宏病毒”感染的文件类型是()。
最新回复
(
0
)