Adobe公司笔试题

时间:2024-06-08 23:56:25 综合指导

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?

Adobe公司笔试题

  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公司笔试题】相关文章:

大唐公司笔试题02-19

中国银行笔试题回顾,新鲜笔经!11-21

公司面试笔试题11-21

热力公司笔试试题09-23

铁塔公司笔试试题04-25

太古地产有限公司笔经02-19

迅雷JAVA广州站二笔笔试题目分享11-21

请关注SHL公司出的试题11-11

Google公司预选笔试试题02-18

烟草公司常见的面试题06-02