Bird
0
0

Which keyword is used to handle all unmatched cases in a switch statement?

easy📝 Conceptual Q2 of 15
C - onditional Statements
Which keyword is used to handle all unmatched cases in a switch statement?
Acase
Bbreak
Cdefault
Delse
Step-by-Step Solution
Solution:
  1. Step 1: Identify the keyword for unmatched cases

    The default keyword handles all cases not matched by any case.
  2. Step 2: Confirm other keywords' roles

    case defines specific matches, else is for if-else, break exits the switch.
  3. Final Answer:

    default -> Option C
  4. Quick Check:

    Default keyword handles unmatched cases [OK]
Quick Trick: Use default for unmatched cases in switch [OK]
Common Mistakes:
  • Confusing default with else
  • Using break to handle unmatched cases
  • Thinking case handles unmatched

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Quizzes