首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下头文件: 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
18
问题
有如下头文件:
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/XdE0FFFM
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
若源程序文件abc.cpp中只有一个函数,该函数的名称为【】。
静态成员函数没有______。
若有函数func(par1,par2+par3,(par4,par5)):在调用该函数时,实参的个数是______。
下面函数返回数组中最大元素的下标,数组中元素个数为t,将程序补充完整。intfindmax(ints[],intt){intk,p;for(p=0,k=p;p<t;p++){if
下面关于友元函数的描述正确的是()。
在软件生存周期中,不属于软件定义阶段的是()。
在下面程序的横线处填上适当的内容,使程序执行后的输出结果为ABCD。#include<iostream>usingnamespacestd;classA{public:A(){cout<<’A’;}
下面是关于派生类声明的开始部分,其中正确的是
对于类定义classA{public:virtualvoidfunc1(){}voidfunc2(){}};classB:publicA{public:
随机试题
A.稽留热B.弛张热C.间歇热D.波状热E.不规则热下列疾病常见的热型是大叶性肺炎
A.阴虚血燥B.痰湿阻滞C.气滞血瘀D.气血虚弱E.肝肾不足
A.发热1~2天出疹,疹点细小,有痒感B.发热3~4天,皮疹出现,热度更高C.发热半天~1天出疹,疹点细小鲜红,颜面无疹D.发热3~4天出疹,热退疹出E.以上都不是风痧是()
某伤害案,由于犯罪嫌疑人系当地公安局局长的儿子,当地公安机关对被害人的报案作出了不立案的处理决定。被害人不服,向检察院提出,要求检察院对此进行监督。人民检察院应当如何处理?
新规范关于混凝土的耐久性设计提出了新的要求,下面哪种说法是不恰当的?
根据《地表水环境质量标准》,高锰酸盐指数Ⅲ类、Ⅳ类标准限值分别是()。
农村资金互助社不得向非社员吸收存款、发放贷款。()
导游服务的最终目标是()。
2000年3月第九届全国人大通过的《立法法》明确规定,有权制定行政法规的是()。
Howdoesliterarystyleevolve?Surprisingly,【C1】______lieinwordswithseeminglylittlemeaning,suchas"to"and"that".
最新回复
(
0
)