Which operator cannot be used with if-else statement?
a) ?: b) &&. c) >. d) ||
Answers
Answered by
4
Answer:
?: operator or ternary operator can't be used in else statement
Answered by
4
Answer:
a]?:
Explanation:
The ternary operator is an operator that takes three arguments. The first argument is a comparison argument, the second is the result upon a true comparison, and the third is the result upon a false comparison. If it helps you can think of the operator as shortened way of writing an if-else statement.
Similar questions