English

State True or False. In ‘switch case’, default is optional.

Advertisements
Advertisements

Question

State True or False.

In ‘switch case’, default is optional.

True or False
Advertisements

Solution

This statement is true.

Explanation:

The default case is completely optional in a switch statement. If no cases match and there is no default, the program simply skips the entire switch block and moves to the next line of code.

shaalaa.com
  Is there an error in this question or solution?
Chapter 1: Revision of Class 9 Syllabus - Exercises [Page 44]

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×