1、(10%) what is the rule of class D_*,UserClass, and client class of D_* and UserClass to access the member of class B?
class B
{/*……..*/};
class D_pri:private B {/**…….*/}
class D_Publ: public B {/**….*/}
class UserClass
{B b;/**..*/}
2 write the output
#include <iostream>
#include <string>
using namespace std;
void println(const std::string& msg)
{
std:cout<<msg<<’’;
}
class Base{
public:
Base() {println(“Base::Base()”);Virt();}
Void f(){println(“Base::f()”);Virt();}
Virtual void virt(){println(“Base()::virt()”);}
};
class Derived:public Base
{
Derived(){println(“Derived:: Derived ()”);Virt();}
Virtual void virt(){println(“Derived ()::virt()”);}
};
int main(int argc,char* argv[])
{
Derived d;
Base *pB=&d;
PB->f();
}
2.1 (5%) what is the output of the code “pB->f();” above?
2.2 (5%) what is the output of the code “Dervied d;” above?
adobe公司最新笔试真题
才干屋
人气:8.56K
相关文章:
- 学生英文演讲稿Developing a good learning habit
- 笔试大观之Oracle Graduate
- 甲骨文(Oracle)笔试经验(Oracle Management Trainee与技术笔试题)
- Be Your Best and Market Yourself 找工之旅
- 大学生英语演讲稿 Knowledge collaboration and all-round education
- 奇梦达(Qimonda)笔试面试经验(Product Engineer 西安)
- 北电笔试归来--Lab Operation
- 一些最有用的IBM IPAT(Personal Aptitude Test)笔试资料
- Adobe笔试题目(技术photoshop)
- Re4_ 攒rp--yahoo非技术笔试题B卷
热门推荐
- 1英语面试问题: What Interests You About This Job?
- 2Oracle Management Trainee笔试题
- 3最常见英语面试题 What are your salary expectations?
- 4面试问题: Tell Me About Yourself
- 5英语面试: Why are you leaving your present job?
- 6英语面试题:Why are you interested in this job?
- 7攒rp--yahoo非技术笔试题B卷
- 8世上最浪费时间的三件事WORRY, BLAME, JUDGEMENT
- 9面试归来之罗兰贝格(Roland Berger)
- 10About Letter of Recommendation
猜你喜欢
- 1Macquarie psychometric assessment 笔经(上海交大BBS 2007.12.26)
- 2HONDA面试题目与笔试题目
- 3台湾Ulead的笔试题,看下
- 4dl-威盛software的试题
- 5Beyondsoft职位面试6篇
- 6德固赛(Evonik Degussa)笔试经验
- 7英文励志文章《Today I begin a new life》
- 8Google公司预选笔试试题
- 9奥浦诺(Opera)笔试题目
- 10Adidas的Open Question
- 11NVIDIA公司ASIC Intern的笔试
- 12英文简历(市场主管)MARKETING AND SALES DIRECTOR
- 13Oracle笔试,HP电面,IBM笔试
- 14Verbal Test类型笔试题
- 15荷兰银行(ABN-AMRO)之业务拓展部笔试题目
今日热门
- 1摩根士丹利(Morgan Stanley)笔试题目
- 2凹凸电子笔试题目(Linux Software Engineer)
- 3欧莱雅笔试题case study
- 4MBA degree英语求职信
- 5EdgavAnselMowrev的名言
- 6高露洁(Colgate)笔试题目
- 7[合集] google昨晚的笔试题,最后3道
- 8英语演讲稿范文:Learn How to Say No
- 9大学生英语演讲稿There is only one failure called never try
- 10面试的十个Don t be
- 11Intel上海lab笔试题
- 12Danone(达能)的Open Question
- 13最新公司员工试用期工作总结
- 14Sybase笔试题型
- 15甲骨文(oracle)技术笔试题
- 16小议sybase笔试题
- 17adobe公司最新笔试真题
- 18Adobe Illustrator选择题试题及答案
更多推荐
- 1单位主要事迹优秀范文大全
- 2关于教师立德树人最美演讲稿范文
- 3期中考试的家长会家长代表发言稿8篇 “共建教育,携手前行”——期中考试家长会代表发言稿
- 4关于《非暴力沟通》读后感热门范文
- 52019年优秀毕业生自荐信
- 6乡村的作文6篇
- 7初二学生入团志愿书范文6篇 "展现团员风采:初二学生入团志愿书典范"
- 8月门店工作总结7篇
- 92023镇法制工作总结精选5篇
- 10幼儿园副园长个人工作总结4篇 "副园长个人工作总结——幼儿园成长见证"
- 11课代表个人学期述职报告范文三篇
- 12绿色环保作文5篇
- 13电影勇敢的心心得体会范文3篇 《心动勇气——电影《勇敢的心》的触动》
- 14实用的五一劳动节演讲稿关于五一劳动节的演讲稿4篇 「勤劳创造价值:实用的五一劳动节演讲稿」
- 15打赢新型冠状病毒感染的肺炎疫情心得体会