Advertisements
Advertisements
Question
State True or False.
In ‘switch.. case’, two variables can be compared.
True or False
Advertisements
Solution
This statement is false.
Explanation:
A switch statement compares a single variable or expression against fixed constant values (literals). It cannot directly compare two different variables against each other in its case labels.
shaalaa.com
Is there an error in this question or solution?
Chapter 1: Revision of Class 9 Syllabus - Exercises [Page 45]
