Question discussion

Which of the following is true about nested switch statements in C?

359229Medium DSSSB TGT Computer Science 0 replies 0 views
0
Which of the following is true about nested switch statements in C?
  • ABoth inner and outer switch statements must have a default case.
  • BA switch statement cannot contain another switch.
  • CInner switch cases should not contain break statement
  • DA switch statement can contain another switch statement inside any of its cases.
Correct answer: D

Explanation

C allows a switch statement to be nested inside a case of another switch.

Discussion 0

Nobody has replied yet. Start the discussion!