ICSE Class 10 Computer Applications
Question 8 of 30
Solved Sample Paper 1 — Question 8
Back to all questions 8
Question Question 1(viii)
Which operator cannot be used with if-else statement?
- <=
- ||
- &&
- ? :
? :
Reason — Relational operators ( <= ) and logical operators (|| and &&) can be used to test a condition as they return boolean values. Ternary operator (? :) is used to assign a value to a variable based on a condition. Thus, it cannot be used with if-else statement.