Basic Operators


  1. Which of these operators can skip evaluating right hand operand?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Operator short circuit and, &&, and short circuit or, ||, skip evaluating right hand operand when output can be determined by left operand alone.


  1. Which of the following operators can operate on a boolean variable?

    1. &&
    2. ==
    3. ?:
    4. +=











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Operator Short circuit AND, &&, equal to, == , ternary if-then-else, ?:, are boolean logical operators. += is an arithmetic operator it can operate only on numeric values.



  1. Which of these is returned by “greater than”, “less than” and “equal to” operators?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    All relational operators return a boolean value ie. true and false.


  1. What is the output of relational operators?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    None