Questions

  1. Which of the following attributes declared in the Car class is not a value type variable?
    1. public Decimal fuelCapacity;
    2. public Enum carColor;
    3. public String registrationNumber;
    4. public Int numberOfSeats
  2. Which of the following is not a reference type variable?
    1. Class
    2. String
    3. Struct
    4. Interface
  3. In C#, a child class can inherit from multiple parent classes. Is this statement correct?
    1. Yes
    2. No
  4. Which of the following statements about interfaces and classes is not correct?
    1. A class can implement multiple interfaces.
    2. An interface can have both function declarations and definitions.
    3. A struct data variable cannot inherit from another struct.
    4. In inheritance, if both the base class and the derived class have a function with the same name, we can use the base keyword to implicitly call the function of the base class.
  5. Which of the following statements about access modifiers is not correct?
    1. If a member variable is declared as public, it can be accessed across the entire application.
    2. If a member variable is declared as private, it can only be accessed in the same class.
    3. If a member variable is declared as protected, it can be accessed throughout the namespace.
    4. If a member variable is declared as protected internal, it can be accessed by classes in the name namespace and the classes that derive from it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.125.205