Home / C# Programming / Inheritance :: True or False

C# Programming :: Inheritance

  1. Multiple inheritance is different from multiple levels of inheritance.

  2. A.
    True
    B.
    False

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. An object of a derived class cannot access private members of base class.

  4. A.
    True
    B.
    False

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. The way a derived class member function can access base class public members, the base class member functions can access public member functions of derived class.

  6. A.
    True
    B.
    False

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. There is no private or protected inheritance in C#.NET.

  8. A.
    True
    B.
    False

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. We can derive a class from a base class even if the base class's source code is not available.

  10. A.
    True
    B.
    False

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. If a base class contains a member function func(), and a derived class does not contain a function with this name, an object of the derived class cannot access func().

  12. A.
    True
    B.
    False

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. If a base class and a derived class each include a member function with the same name, the member function of the derived class will be called by an object of the derived class

  14. A.
    True
    B.
    False

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. The size of a derived class object is equal to the sum of sizes of data members in base class and the derived class.

  16. A.
    True
    B.
    False

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Private members of base class cannot be accessed by derived class member functions or objects of derived class.

  18. A.
    True
    B.
    False

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. A class D can be derived from a class C, which is derived from a class B, which is derived from a class A.

  20. A.
    True
    B.
    False

    View Answer

    Workspace

    Discuss Discuss in Forum