1. Question: Which operator is used to perform a logical AND operation?

    A
    &

    B
    &&

    C
    and

    D
    ||

    Note: The && operator is a short-circuit logical AND that evaluates the second operand only if the first is true.
    1. Report
  2. Question: What does the operator | do?

    A
    Performs logical OR

    B
    Performs bitwise OR

    C
    Performs both Logical and bitwise OR

    D
    None

    Note: The | operator performs a bitwise OR operation on two integral types.
    1. Report
  3. Question: What is the output of 3 ^ 2?

    A
    1

    B
    5

    C
    0

    D
    6

    Note: The ^ operator performs a bitwise XOR operation; hence, 3 ^ 2 results in 1 (binary 11 ^ 10 = 01).
    1. Report
  4. Question: What does the ?? operator do?

    A
    Checks for equality

    B
    Returns the left operand if not null, otherwise the right operand

    C
    Performs logical negation

    D
    None

    Note: The ?? operator is known as the null-coalescing operator.
    1. Report
  5. Question: Which operator has the highest precedence in C#?

    A
    +

    B
    *

    C
    /

    D
    -

    Note: Multiplication and division have higher precedence than addition and subtraction.
    1. Report
  6. Question: What is the result of 1 << 3

    A
    1

    B
    2

    C
    8

    D
    4

    Note: The left shift operator << shifts bits to the left, effectively multiplying the number by 2 for each shift.
    1. Report
  7. Question: What is the output of the expression 5 % 2?

    A
    1

    B
    2

    C
    0

    D
    5

    Note: The modulo operator % returns the remainder of the division.
    1. Report
  8. Question: What does !true evaluate to?

    A
    true

    B
    false

    C
    null

    D
    Error

    Note: The ! operator negates the boolean value.
    1. Report
  9. Question: What does a &= b do?

    A
    Sets a to b

    B
    Performs bitwise AND and assigns the result to a

    C
    Adds a and b

    D
    None

    Note: This is a compound assignment operator.
    1. Report
  10. Question: What is the output of 10 / 3?

    A
    3

    B
    3.3333

    C
    4

    D
    2

    Note: Integer division truncates the decimal part.
    1. Report
Copyright © 2025. Powered by Intellect Software Ltd