switch case objective / Interview / MCQ Questions in C Programming



  1. Example 1  : Order of cases 
  2. Example 2  : Every Statement should be wrapped within any of case
  3. Example 3  : Every case label should be unique
  4. Example 4  : Constant Expression is allowed
  5. Example 5  : Variables in switch case label not allowed 
  6. Example 6  : Semicolon after switch
  7. Example 7  : No Case in switch
  8. Example 8  : Misplaced Continue in switch
  9. Example 9  : Multiple numbers in case Label (use of Comma)
  10. Example 10: Shift Operators in Switch Case
  11. Example 11: #define macro-identifier in Switch 
  12. Example 12: Const variable allowed in switch label
  13. Example 13: Multiple parameters to switch case
  14. Example 14: Multiple Cases and One Break
  15. Example 15: Characters are allowed
  16. Example 16: Expressions are allowed in switch
  17. Example 17: Negative Cases are allowed
  18. Example 18: Cases may be int/char
  19. Example 19: Comparison Not allowed
  20. Example 20: Floating Cases not allowed