GeeksforGeeks » Interview Questions

Adobe Interview Question for Software Engineer/Developer (Fresher) about C++, Object Oriented

(1 post)
  • Started 8 months ago by ganesh
  1. ganesh
    guest
    Posted 8 months ago #

    Base class contains 2 functions and Derived class (with Private Inheritance from Base) also contains 2 functions (same name as those in Base cass), then he asked me the effect by changing the Inheritance type and making different functions virtual like - virtual func in Base then in Derived and then both .

    2) Same question appended- A derived class A derived from Derived and Base , now

    A a = new A;
    Base *b = a;
    Derived *d = a;

    b = d;

    and b = (Base *) d;

    then which functions can I call ?


Reply

You must log in to post.

RSS feed for this topic