- 相关推荐
Adobe公司笔试题
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
#include
using namespace std;
void println(const std::string& msg)
{
std:cout<
}
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公司笔试题】相关文章:
铁塔公司笔试试题03-25
广告公司常考笔试题08-10
外贸公司面试笔试题目03-11
山东高速股份有限公司的笔试题目03-31
面试题:对跳槽的看法11-04
面试心理测试题08-19
幼师招聘笔试题目04-02
报社笔试题目及答案03-18
英语电话面试题目04-06
面试题:怎样对待失败04-22