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