Basic Operators
- Which of these operators can skip evaluating right hand operand?
-
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.
- Which of the following operators can operate on a boolean variable?
1. &&
2. ==
3. ?:
4. +=
-
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.
- Which of these is returned by “greater than”, “less than” and “equal to” operators?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
All relational operators return a boolean value ie. true and false.
- What is the output of relational operators?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
None