1. Question: What is the output of !(true && false)?

    A
    true

    B
    false

    C
    null

    D
    Error

    Note: The expression inside evaluates to false, and negating it results in true.
    1. Report
  2. Question: Which operator is used to check for equality?

    A
    ==

    B
    =

    C
    =!=

    D
    ===

    Note: The == operator checks if two values are equal.
    1. Report
  3. Question: What does the as operator do?

    A
    Casts an object to a specified type and returns null if the cast fails

    B
    Checks the type of an object

    C
    Assigns a value to a variable

    D
    None

    Note: The as operator is used for safe type casting.
    1. Report
  4. Question: Which operator would you use to perform a logical negation?

    A
    &

    B
    |

    C
    !

    D
    ~

    Note: The ! operator negates a boolean value.
    1. Report
  5. Question: What does a %= b do?

    A
    Assigns the remainder of a divided by b to a

    B
    Subtracts b from a

    C
    Adds b to a

    D
    None

    Note: This is a compound assignment operator.
    1. Report
  6. Question: What is the output of true && true || false?

    A
    true

    B
    false

    C
    null

    D
    error

    Note: The logical AND is evaluated first, resulting in true, which then evaluates to true with the OR.
    1. Report
  7. Question: Which operator performs a bitwise AND operation?

    A
    &&

    B
    &

    C
    |

    D
    ||

    Note: The & operator performs a bitwise AND operation on two integral types.
    1. Report
  8. Question: Which operator is used to perform a ternary conditional operation?

    A
    &&

    B
    ? :

    C
    if

    D
    switch

    Note: The ternary operator allows for shorthand conditional expressions.
    1. Report
  9. Question: What does x != y check?

    A
    If x is less than y

    B
    If x is greater than y

    C
    If x is equal to y

    D
    If x is not equal to y

    Note: != operator checks for inequality.
    1. Report
  10. Question: What is the result of 10 % 3?

    A
    1

    B
    2

    C
    0

    D
    3

    Note: The modulo operator returns the remainder of the division.
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd