The Unbeatable Quiz On C# Test

9 Questions | Total Attempts: 603

Settings
Please wait...
C Sharp Quizzes & Trivia

Do you consider yourself to be a programming wiz? If you said yes then the quiz below is perfect to test just how awesome you are at programming. The quiz is unbeatable and if you achieve to best it, are a true genius. All the best and let’s see what you’ve got.


Questions and Answers
  • 1. 
    Does c# support multiple inheritance?
    • A. 

      Yes

    • B. 

      No

  • 2. 
    • A. 

      Declare the class as Virtual

    • B. 

      Declare the class as Private

    • C. 

      Declare the class as Sealed

    • D. 

      Declare the class as Internal

    • E. 

      None of the above

  • 3. 
    Can you inherit from multiple interfaces?
    • A. 

      Yes

    • B. 

      No

  • 4. 
    • A. 

      They are all declared as public by default

    • B. 

      They are all declared as private by default

    • C. 

      They are all declared as virtual by default

    • D. 

      They are all declared as internal by default

    • E. 

      They are all declared as sealed by default

  • 5. 
    • A. 

      Different parameter names

    • B. 

      Different parameter data types

    • C. 

      Different number of parameters

    • D. 

      Different ordering of parameters

    • E. 

      Changing the method name

  • 6. 
    What is the difference between the System.String and System.StringBuilder class?
    • A. 

      System.StringBuilder is immutable and System.String is mutable

    • B. 

      System.StringBuilder is mutable and System.String is immutable

    • C. 

      System.StringBuilder is a based on a class and System.String is based on a struct

  • 7. 
    Structs are passed by Reference?
    • A. 

      True

    • B. 

      False

  • 8. 
    You have variable of type string name strValue. What are some of the ways this can be converted to a int?
    • A. 

      Int.convert(strValue)

    • B. 

      Convert.ToInt32(strValue)

    • C. 

      Int32.Parse(strValue)

    • D. 

      Int.value

    • E. 

      Bool result = int32.TryParse(strValue, out i)

  • 9. 
    How do you enforce garbage collection in .NET?
    • A. 

      Garbage.Collect()

    • B. 

      Collect()

    • C. 

      This.Collect.Garbage()

    • D. 

      System.GC.Collect()