首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下头文件: int n(); static int f2(); class MA{ public: int f3(); static int f4(); }; 在所描述的函数中,具有隐含的this指针的是( )。
有如下头文件: int n(); static int f2(); class MA{ public: int f3(); static int f4(); }; 在所描述的函数中,具有隐含的this指针的是( )。
admin
2017-07-28
34
问题
有如下头文件:
int n();
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/9FAp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
在下面程序的横线处填上适当的语句,使该程序执行结果为10。#include<iostream>usingnamespacestd;classMyClass{public:MyClasS(in
含有纯虚函数的类称为______。
当使用fstram流类定义一个流对象并打开一个磁盘文件时,文件的隐含打开方式为
下列对派生类的表述中,错误的是()。
下列特征中不是面向对象方法的主要特征的是()。
数据库系统阶段的数据具有较高独立性,数据独立性包括物理独立性和______两个含义。
数据库系统其内部分为三级模式,即概念模式、内模式和外模式。其中,______是用户的数据视图,也就是用户所见到的数据模式。
为了在两个关系中提取所有相同的元组,则在交与并这两种关系运算中,应使用【 】运算。
下列选项中,正确的C++标识符是
下列符号中可以用作C++标识符的是()。
随机试题
酒渣鼻
关于业主方项目管理组织结构图的设计,下列说法不正确的是()。
某投资项目,计算期为6年,各年净现金流量见下表。该项目的行业基准收益率为10%,则其财务净现值为()万元。
省、自治区、直辖市人民政府建设行政主管部门应当自受理申请甲级工程造价咨询企业的申请材料之日起()日内审查完毕,并将初审意见和全部申请材料报国务院建设行政主管部门;国务院建设行政主管部门应当自受理申请材料之日起()日内作出决定。
A机电安装工程公司承包了一座中外合资乳品厂的机电安装工程,主要设备及工艺管道全部进口,对于部分工艺管线的材质,A公司没有接触过。其中的喷粉塔高40m,最上部的塔节重20t,需要整体吊装。项目部根据吊装方案,决定采用汽车吊。外方专家要求:工艺管线的焊工要经
Word2003中,如果进行了错误操作,只需按一下()键,就可以恢复到错误操作前的状态。
某银行给甲企业在2011年度的贷款限额为5000万元,由于甲企业的管理层决策失误,致使企业遭受信用危机,于是银行方面拒绝承担贷款义务。此时,银行会承担法律责任。()
“双峰插云”、“琴屿飘灯”、“晚霞夕照”、“银苍玉洱”等景观依次分别在()。
语言:思想
WhyMoreFarmersAreSwitchingtoGrass-FedMeatandDairyA)Thoughhedidn’tcomefromafarmingfamily,fromayoungageT
最新回复
(
0
)