首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下头文件: int f1(); static int f2(); class MA{ public: int f3(); static int f4(); }; 在所描述的函数中,具有隐含的this指针的是( )。
有如下头文件: int f1(); static int f2(); class MA{ public: int f3(); static int f4(); }; 在所描述的函数中,具有隐含的this指针的是( )。
admin
2020-10-21
26
问题
有如下头文件:
int f1();
static int f2();
class MA{
public:
int f3();
static int f4();
};
在所描述的函数中,具有隐含的this指针的是( )。
选项
A、f1
B、f2
C、f3
D、f4
答案
C
解析
只有类的非静态成员函数才隐含this指针,其作用域是类内部,当类的非静态成员函数中访问类的非静态成员时,编译器会自动将对象本身的地址作为一个隐含参数传递给函数,而不必一定写上this。所以本题答案为C。
转载请注明原文地址:https://jikaoti.com/ti/3wl0FFFM
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
在语句“cout
为类Matrix重载下列运算符时,只能作为Matrix类成员函数重载的运算符是()。
一棵二叉树共有25个结点,其中5个是叶子结点,则度为1的结点数为()。
下列链表中,其逻辑结构属于非线性结构的是()。
下列运算符不能重载为友元函数的是()。
语句int*p:&k;定义了指针p,与这个语句等效的语句序列是()。
有如下程序:#includeusingnamespacestd;classvehicle{public:virtualintwheels()eonst{return0;}};
有如下说明:inta[10]={1,2,3,4,5,6,7,8,9,10},*p=a;则数值为9的表达式是()。
请使用【答题】菜单命令或直接用VC6打开考生文件夹下的工程proj3,其中声明的是一个人员信息类,补充编制程序,使其功能完整。在main函数中给出了一组测试数据,此种情况下程序的输出应该是:Zhang20Tsinghua。注意:只能在函数ad
使用VC6打开考生文件夹下的源程序文件modi2.cpp。阅读下列函数说明和代码。函数sort(int&m,int&n,int&1)实现将三个整数m、n、l由大到小输出。m最大,l最小。程序分析:程序实现时,可以把最大的数放到m上,先将m与n进行
随机试题
对ARDS的诊断和病情判断有重要意义的检查的是
医疗机构出售无偿献血的血液所承担的法律责任是A.给予医疗机构负责人行政处分B.予以取缔并处10万元以上罚款C.没收违反所得并处15万元以下罚款D.处10万元以上的罚款E.构成犯罪的,依法追究刑事责任
A.磺胺嘧啶B.链霉素C.红霉素D.苯巴比妥E.水杨酸钠
下列选项中()属于业主方的投资控制。
【背景资料】某空调工程,该工程采用集中式空调系统,风管系统设计工作压力为1600Pa。某工程公司承担了此空调工程的施工任务,在风管的制作与安装施工过程中,其部分具体的施工方法和过程如下:(1)风管穿过需要封闭的防火防爆楼板时,设置了
某企业于2007年11月接受一项产品安装任务,采用完工百分比法确认劳务收入,预计安装期14个月,合同总收入200万元,合同预计总成本为158万元,至2008年底已预收款项160万元,余款在安装完成时收回,至2008年12月31日实际发生成本152万元.预计
对联俗称对子,又名楹联、联语。一般用汉字书写在两条长幅上。长幅必须是对称的形式,悬挂在左右相对的位置上。下列选项中前后两句不能称之为对联的是()。
2011年3月26日,由WWF(世界自然基金会)发起的“地球一小时”活动在全球展开。全球数千个城市,在当地区时20点30分至21点30分这一个小时内,依次熄灭电灯、关闭电源。WWF还在3月22日到3月26日(周一至周六)推出“地球一小时”低碳生活周,引领公
以和为贵、__________的精神,贯穿中华民族发展的全部历史,渗透在社会生活的方方面面,使我们不同族群、不同地域的不同文化,不断相互吸取、相互融合,形成了__________、丰富多彩的中华文化。填入画横线部分最恰当的一项是:
(2016河南)中国是个太阳能资源非常丰富的国家,96%的地区有可利用的太阳能资源,绿色、节能的太阳能热水器深受不同地域消费者的青睐。然而,一项对24个省市太阳能热水器使用状况的调查,却显示出不容乐观的结果:40.87%的太阳能热水器一到冬天就无法使用,6
最新回复
(
0
)