首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列程序中下画线处应填入的语句是 class Base { public: void fun( ) {cout < < "Baseoffun" < < endl;} }; class Derived:publ
下列程序中下画线处应填入的语句是 class Base { public: void fun( ) {cout < < "Baseoffun" < < endl;} }; class Derived:publ
admin
2010-12-16
57
问题
下列程序中下画线处应填入的语句是
class Base
{
public:
void fun( ) {cout < < "Baseoffun" < < endl;}
};
class Derived:public Base
{
void fun( )
{
______//显示基类的成员函数fun
cout < < "Derived of fun" < < endl;
}
};
选项
A、fun( ) ;
B、Base. fun( ) ;
C、Base: :fun( ) ;
D、Base->fun( ) ;
答案
C
解析
如果在子类中要访问父类的函数应用“: :”运算符。
转载请注明原文地址:https://kaotiyun.com/show/c9Vp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
以下说法正确的是()。
有以下函数intfun(char*s,char*t){while((*s)&&(*t)&&(*t++==*s++));return(*s-*t);}函数的功能是
有以下程序:#include#defineSUB(a)(a)-(a)main(){inta=2,b=3,c=5,d;d=SUB(a+b)*c;printf("%d\n",d);}程序运行
以下程序的输出结果是()。#include<stdio.h>main()structst{p=aa;{intx;int*y;}*p;printf("
面向对象方法中,继承是指()。
有以下程序#include<stdio.h>voidmain(){intn=2,k=1;while(!(k>0||n++));printf(’’%d%d\n’’,k,n);}程序运行
以下关于long、int和short类型数据占用内存大小的叙述中正确的是()。
下列叙述中正确的是()。
下列特征中不是面向对象方法的主要特征的是()。
下列说法不正确的是()。
随机试题
Robertwasveryunhappyfornot________tothewedding.
【案例】患者,男,35岁,因手术需要进行蛛网膜下腔阻滞麻醉。麻醉过程中出现心率过缓。应给予的药物是()。
工程咨询主要是围绕()展开的。
[2017年真题]根据《建筑工程建筑面积计算规范》(GB/T50353—2013),不计算建筑面积的有()。
法的发展历史表明,法不受经济以外的其他因素的影响。()
张某起诉周某人身损害赔偿一案,被告答辩提出原告的请求超过诉讼时效,法院应当如何处理?()
已知A是3阶矩阵,α1(i=1,2,3)是3维非零列向量,若Aαi=iαi(i=1,2,3),令α=α1+α2+α3证明:α,Aα,A2α线性无关;
StandardEnglishisthevarietyofEnglishwhichisusuallyusedinprintandwhichisnormallytaughtinschoolsandtonon-nat
ThespeakersaremakingarrangementsforMonday,TuesdayandWednesday.
Ashardasitistohaveanhonestdialogueaboutbusinessdecisions,itisevenhardertogiveindividualshonest______.Thisi
最新回复
(
0
)