logo

CuriousTab

CuriousTab

Discussion


Home C# Programming Inheritance Comments

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


  • Options
  • A. True
  • B. False

  • Correct Answer
  • True 

    Explanation
    The private members of the base class are never accessible outside the class.

  • Inheritance problems


    Search Results


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

    • Options
    • A. True
    • B. False
    • Discuss
    • 2. Creating a derived class from a base class requires fundamental changes to the base class.

    • Options
    • A. True
    • B. False
    • Discuss
    • 3. There is no private or protected inheritance in C#.NET.

    • Options
    • A. True
    • B. False
    • Discuss
    • 4. 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().

    • Options
    • A. True
    • B. False
    • Discuss
    • 5. It is illegal to make objects of one class as members of another class.

    • Options
    • A. True
    • B. False
    • Discuss


    Comments

    There are no comments.

Enter a new Comment