1. Question: What is the extension of a C# source code file?

    A
    .cs

    B
    .csharp

    C
    .C#

    D
    .cpl

    Note: Not available
    1. Report
  2. Question: What keyword is used to declare a constant in C#?

    A
    static

    B
    const

    C
    final

    D
    readonly

    Note: Not available
    1. Report
  3. Question: Which of the following statements is true about interfaces in C#?

    A
    An interface can contain implementation of methods.

    B
    A class can implement multiple interfaces.

    C
    Interfaces can inherit from classes.

    D
    An interface cannot be instantiated.

    Note: Not available
    1. Report
  4. Question: What is the default value of a boolean variable in C#?

    A
    true

    B
    false

    C
    0

    D
    1

    Note: Not available
    1. Report
  5. Question: Which of the following is used to handle exceptions in C#?

    A
    try-catch

    B
    handle-exception

    C
    exception-try

    D
    catch-throw

    Note: Not available
    1. Report
  6. Question: What does the 'static' keyword signify in C#?

    A
    The member belongs to an instance of the class.

    B
    The member can only be accessed by the class itself.

    C
    The member can be accessed without creating an instance of the class.

    D
    The member can be overridden in derived classes.

    Note: Not available
    1. Report
  7. Question: Which of the following is NOT a built-in access modifier in C#?

    A
    public

    B
    private

    C
    protected

    D
    internalprotected

    Note: Not available
    1. Report
  8. Question: What does the 'override' keyword do in C#?

    A
    It creates a new method with the same name in a derived class.

    B
    It replaces a method in the base class with a new implementation.

    C
    It prevents a method from being overridden in derived classes.

    D
    It indicates a method is static.

    Note: Not available
    1. Report
  9. Question: In C#, which collection class is used to store key-value pairs?

    A
    List

    B
    Array

    C
    Dictionary

    D
    Queue

    Note: Not available
    1. Report
  10. Question: What is the output of the following code?
    Console.WriteLine(5 + 10 + "15");

    A
    15

    B
    1515

    C
    15 15

    D
    20

    Note: In C#, when you use the + operator, if either operand is a string, it performs string concatenation. Here, 5 + 10 evaluates to 15, and then "15" is concatenated, resulting in "1515".
    1. Report
Copyright © 2025. Powered by Intellect Software Ltd