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.48K
相关文章:
- 奇梦达(Qimonda)笔试面试经验(Product Engineer 西安)
- 北电笔试归来--Lab Operation
- 大学生英语演讲稿 Knowledge collaboration and all-round education
- 学生英文演讲稿Developing a good learning habit
- Adobe笔试题目(技术photoshop)
- Be Your Best and Market Yourself 找工之旅
- Re4_ 攒rp--yahoo非技术笔试题B卷
- 笔试大观之Oracle Graduate
- 甲骨文(Oracle)笔试经验(Oracle Management Trainee与技术笔试题)
- 一些最有用的IBM IPAT(Personal Aptitude Test)笔试资料
热门文章
- 1About Letter of Recommendation
- 2攒rp--yahoo非技术笔试题B卷
- 3英语面试问题: What Interests You About This Job?
- 4Oracle Management Trainee笔试题
- 5面试问题: Tell Me About Yourself
- 6世上最浪费时间的三件事WORRY, BLAME, JUDGEMENT
- 7面试归来之罗兰贝格(Roland Berger)
- 8最常见英语面试题 What are your salary expectations?
- 9英语面试: Why are you leaving your present job?
- 10英语面试题:Why are you interested in this job?
推荐文章
- 1台湾Ulead的笔试题,看下
- 2德固赛(Evonik Degussa)笔试经验
- 3英文励志文章《Today I begin a new life》
- 4荷兰银行(ABN-AMRO)之业务拓展部笔试题目
- 5Adidas的Open Question
- 6HONDA面试题目与笔试题目
- 7Oracle笔试,HP电面,IBM笔试
- 8奥浦诺(Opera)笔试题目
- 9Verbal Test类型笔试题
- 10Macquarie psychometric assessment 笔经(上海交大BBS 2007.12.26)
- 11Google公司预选笔试试题
- 12dl-威盛software的试题
- 13NVIDIA公司ASIC Intern的笔试
- 14Beyondsoft职位面试6篇
- 15英文简历(市场主管)MARKETING AND SALES DIRECTOR
最近文章
- 1欧莱雅笔试题case study
- 2甲骨文(oracle)技术笔试题
- 3高露洁(Colgate)笔试题目
- 4Sybase笔试题型
- 5大学生英语演讲稿There is only one failure called never try
- 6EdgavAnselMowrev的名言
- 7[合集] google昨晚的笔试题,最后3道
- 8英语演讲稿范文:Learn How to Say No
- 9摩根士丹利(Morgan Stanley)笔试题目
- 10adobe公司最新笔试真题
- 11面试的十个Don t be
- 12Danone(达能)的Open Question
- 13Adobe Illustrator选择题试题及答案
- 14最新公司员工试用期工作总结
- 15凹凸电子笔试题目(Linux Software Engineer)
- 16MBA degree英语求职信
- 17Intel上海lab笔试题
- 18小议sybase笔试题