English

State True or False. In ‘switch.. case’, two variables can be compared.

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]

APPEARS IN

Rupa Pandit Computer Applications [English] Class 10 ICSE
Chapter 1 Revision of Class 9 Syllabus
Exercises | Q 2. (vii) | Page 45
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×