(1) Write the syntax of switch statement.
Answers
Answered by
6
A general syntax of how switch-case is implemented in a 'C' program is as follows: switch( expression ) { case value-1: Block-1; Break; case value-2: Block-2; Break; case value-n: Block-n; Break; default: Block-1; Break; } Statement-x; ... A block is nothing but multiple statements which are grouped for a particular case.
I hope it help
Similar questions