首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下头文件: 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
2015-07-22
32
问题
有如下头文件:
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/0tE0FFFM
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
定义如下枚举类型:enum{Monday,Tuesday,Wednesday,Thrusday,Friday=2};则下列语句正确的是()。
已知一个类Sample,()是定义指向类Sample成员函数的指针,假设类有三个公有成员:voidf1(int),voidf2(int)和inta。
下列关于纯虚函数与抽象类的描述中,错误的是()。
下面程序的运行结果为()。#include<iostream.h>voidmain(){chara=’3’:switch(a){c
有如下类的定义。空格处的语句是classMyClass{______intx,y;public:MyClass(inta=0,intb=0){x=a;y=b;
下列叙述中正确的是
下面关于虚函数的描述中正确的是
在结构化分析使用的数据流图(DFD)中,利用【】对其中的图形元素进行确切解释。
在关系数据库中,用来表示实体之间联系的是【 】。
当使用ifstream流类定义一个流对象并打开一个磁盘文件时,文件的默认打开方式为
随机试题
《创业史》中塑造得最精彩的中国老一代农民的典型是()
地榆的功效是_________。_________。其中,_________多炒炭用,_________多生用。
该患儿最可能的诊断为若无以上检查条件,可采用
管道与设备连接前,应在自由状态下检验法兰的(),偏差应符合规定要求。
一般资料:求助者,女性,54岁,某国企部门经理。案例介绍:求助者与丈夫感情好,家庭条件优越。今年春节前得知儿子是同性恋,当时就被气疯了,丈夫和儿子激烈地争吵。在接下来的两天里,求助者和丈夫都没有去上班,丈夫时而唉声叹气,时而火冒三丈,求助者则是默
一般资料:求助者,男性,16岁,高中一年级学生。案例介绍:求助者原来学习成绩一般,这学期成绩明显下降。父母亲反映求助者以前乐于助人,但现在与老师、同学的矛盾很深,有时甚至上课时喊叫,遂强行将其带来咨询。下面是心理咨询师与求助者的一段对话
[2008年10月]以下命题中正确的一个是()。
A、正确B、错误A
Manysmallculturalgroupsliveinplacesfarawayfrommoderncities.Someofthesetribeshaveneverhadanycommunicationout
Itiscommonlyheldthatdrinkingmoderateamountsofalcoholcanreducetheoddsofhavingadeadlyheartattack.More【B1】_____
最新回复
(
0
)