首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列程序段中包含4个函数。其中具有隐含this指针的是( )。 int fun1(); class Test{ public: int fun2(); friend int fun3(): static
下列程序段中包含4个函数。其中具有隐含this指针的是( )。 int fun1(); class Test{ public: int fun2(); friend int fun3(): static
admin
2019-06-04
29
问题
下列程序段中包含4个函数。其中具有隐含this指针的是( )。
int fun1();
class Test{
public:
int fun2();
friend int fun3():
static int fun4();
}
选项
A、fun1
B、fun2
C、fun3
D、fun4
答案
B
解析
this指针是成员函数所属对象的指针,它指向类对象的地址。成员函数通过这个指针知道自己属于哪一个对象。this指针是一个隐含的指针,它隐含于每个类的非静态成员函数中,它明确的地表示出了成员函数当前操作的数据所属的对象。
转载请注明原文地址:https://kaotiyun.com/show/in8p777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
在最坏情况下,冒泡排序的时间复杂度为______。
下列程序的输出结果是______。#include<iostream>#include<cstring>usingnamespacestd;voidfun(constchar*S,char&C){e=
A、 B、 C、 D、 B算法的空间复杂度一般是指:执行这个算法所需要的存储空间,其中包括算法程序所占的空间、输入的初始数据所占用的存储空间以及算法执行过程中所需要的额外空间。
面向对象程序设计主要经历了结构化设计和面向对象的程序设计阶段,面向对象在现在的程序设计中得到广泛的应用。
A、 B、 C、 D、 B此题考查的是内联函数。Cc++语言引入内联函数的原因是用它来取代C语言的预处理宏函数。
若有类声明:classMyClass{public:MyClass(){cout<<1;}};执行下列语句MyClassa,b[2],*P[2];以后,程序的输出结果是A)11
有如下程序:#include<iostream>usingnamespacestd;classA{public:staticinta;voidinit(){a=l;}A(i
相关文档计算机软件是计算机系统中与硬件相互依存的另一部分,是包括程序、数据及相关文档的完整集合。
随机试题
氧疗过程中需评估哪些状况,以判断用氧效果:
安静时,产热最多的器官是()。
下列说法中属于法的普遍性的含义的有()。
()是商业银行监管的首要环节,是保障银行机构稳健运行和金融体系安全的重要基础。
检查到的有不合格产品的建材企业占全国监督企业总数的百分比为:()检查到的有不合格产品企业的个数是:()
商品的价值
请使用VC6或使用【答题】菜单打开考生文件夹proj2下的工程proj2,其中有整数栈类IntList、顺序栈类SeqList和链接栈类LinkList的定义。请在程序中的横线处填写适当的代码并删除横线,以实现上述类定义。此程序的正确输出结果应为:
A、Itwascreatedmainlyforscientificresearch.B、Itworksbetterinfineweatherconditions.C、Itmustbelocatedonatleast
TopicALetterofConsolationForthispart,youareallowed30minutestowritealettertoconsoleyourfriendwhosefamilyha
在21世纪初,我国出现了免费的地铁报(subwaynewspaper)。北京、上海、广州等大城市都有自己的地铁报。这些报纸通常在上班高峰期时在地铁站里发放。越来越多的人因为这些地铁报而重拾文字阅读的习惯。地铁报之所以受欢迎是因为它们非常了解受众读者(ta
最新回复
(
0
)