首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下头文件: 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
20
问题
有如下头文件:
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://kaotiyun.com/show/ztfp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
以下程序的执行结果为()。#inc1ude<iostream.h>c1assSamp1e{intn;public:Samp1e(inti){n=i;}operator++0
有如下程序:#inc1ude<iostream>usingnamespacestd;classAA{intn:public:AA(intk):n(k){}intget(){
有如下程序:#includeusingnamespacestd;classTV{public:TV(ints=41):size(s){}
下列关于输入流类成员函数getline()的叙述中,错误的是
设有如下关系表:则下列操作正确的是()。
结构化程序设计的3种结构是()。
请使用VC6或使用【答题】菜单打开考生文件夹proj1下的工程proj1。程序中位于每个“//ERROR****found****”之后的一行语句有错误,请加以改正。改正后程序的输出结果应为:Name:SmithAge:21ID:99999Cour
如下类定义:classAA{inta;public:intgetRef()const{return&a;}//①intgetValue()const{returna;}
将E-R图转换到关系模式时,实体与联系都可以表示成()。
随机试题
不宜冷藏的细菌是
患者,女性,36岁。近一段时间出现不规则阴道出血,经量增多,并感到阴道排液也增多,并有恶臭。建议作
新建项目的分项工程质量评定中,关键实测项目的合格率不应低于90%,机电工程的合格率不应低于95%。()
当路基压实度因含水量过大而达不到要求时,应继续碾压。()
以下选项中关于设备制造过程的持续改进叙述正确的是( )。
根据《水利工程质量监督管理规定》(水建[1997]339号),工程质量监督机构监督检查和认定()的划分。
简述格式条款的概念和我国合同法对格式条款的法律要求。
老张、老王、老李、老赵四人的职业分别是司机、教授、医生、工人。老张比教授个子高。老李比老王个子矮。工人比司机个子高。医生比教授个子矮。工人不是老赵就是老李。根据以上条件,可推出以下哪项?
打开工作簿文件Excel.xlsx,将工作表Sheet1的A1:F1单元格合并为一个单元格,内容水平居中,计算“总计”行和“合计”列单元格的内容,将工作表命名为“商品销售数量情况表”。
Withthepossibleexceptionofequalrights,perhapsthemost【C1】______issueacrosstheUnitedStatestodayisthedeathpenalty
最新回复
(
0
)