首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下头文件: 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
2021-06-10
17
问题
有如下头文件:
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/2Ph0FFFM
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
请使用VC6或使用【答题】菜单打开考生文件夹proj3下的工程proj3,其中声明的DataList类,是一个用于表示数据表的类。sort成员函数的功能是将当前数据表中的元素升序排列。请编写这个sort函数。程序的正确输出应为:排序前:7,1,3,1
下列运算符中,不能重载为类的友元函数的运算符是
请打开考生文件夹下的解决方案文件proj2,其中有类Point(“点”)、Rectangle(“矩形”)和Circle(“圆”)的定义。在程序所使用的平面坐标系统中,x轴的正方向是水平向右的,Y轴的正方向是竖直向下的。请在横线处填写适当的代码并删除横线,以
C++系统预定义了4个用于标准数据流的对象,下列选项中不属于此类对象的是()。
请使用VC6或使用【答题】菜单打开考生文件夹proj2下的工程proj2,此工程包含有一个源程序文件proj2.cpp,其中定义了Stack类和ArrayStack类。Stack是一个用于表示数据结构“栈”的类,栈中的元素是字符型数据。Stack
下列符号中不属于C++关键字的是()。
按照“后进先出”原则组织数据的数据结构是()。
若实体A和B是一对多的联系,实体B和C是一对一的联系,则实体A和C的联系是()。
在E-R图中,用来表示实体联系的图形是()。
数据结构中,与所使用的计算机无关的是数据的()。
随机试题
OnereasonforthesuccessesofAsianimmigrantsintheU.S.isthattheyhavetakengreat______toeducatetheirchildren.
咳嗽是一种保护性反射,其效应器不包括
当胆结石进入胆总管时,患者的粪便颜色最可能变成以下哪种
下列疾病中属于甲类传染病的是
消火栓沿道路设置时,消火栓距路缘不大于2m,距建(构)筑物外墙不小于()m。
在中国境内未设立机构、场所的非居民企业取得的下列所得中,以收入全额为应纳税所得额的有()。
按照权责发生制原则的要求,下列货款应确认为主营业务收入的是()。
系统处于DMA模式时,每传送一个数据所要占用的时间为()。
Thecohesiveness(内聚力)ofafamilyseemstorelyonmemberssharingcertainroutinepracticesandevents.Foragrowingshareoft
Onwhatdayoftheweekwillthemagazinearrive?
最新回复
(
0
)