1. Question: Which data type would you use to store a single Unicode character in C#?

    A
    string

    B
    char

    C
    byte

    D
    int

    Note: Not available
    1. Report
  2. Question: Which keyword is used to declare a variable whose value can only be assigned in the constructor?

    A
    const

    B
    static

    C
    readonly

    D
    final

    Note: Not available
    1. Report
  3. Question: What is the purpose of the readonly keyword in C#?

    A
    To make a variable accessible only in read mode

    B
    To prevent modifying the variable after initialization

    C
    To make the variable accessible in all derived classes

    D
    To declare a variable as a constant

    Note: Not available
    1. Report
  4. Question: Which data type is used for financial calculations requiring high precision?

    A
    float

    B
    double

    C
    decimal

    D
    int

    Note: Not available
    1. Report
  5. Question: What will happen if you try to assign a float to an int without casting?

    A
    The value will be implicitly cast

    B
    A compilation error will occur

    C
    The value will be rounded to the nearest integer

    D
    The decimal part will be ignored

    Note: Not available
    1. Report
  6. Question: Which of the following is the default value of a string variable in C#?

    A
    ""

    B
    null

    C
    "default"

    D
    "null"

    Note: Not available
    1. Report
  7. Question: What is the maximum value of an int in C#?

    A
    32767

    B
    2147483647

    C
    9223372036854775807

    D
    1000000000

    Note: Not available
    1. Report
  8. Question: Which type is used to represent 64-bit signed integers in C#?

    A
    int

    B
    long

    C
    byte

    D
    short

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

    A
    0

    B
    0.0

    C
    Null

    D
    1.0

    Note: Not available
    1. Report
  10. Question: Which data type represents a single precision floating-point number in C#?

    A
    double

    B
    float

    C
    decimal

    D
    int

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd