write syntax of switch case in java and c++
Answers
Answered by
0
Answer:
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; The expression can be integer expression or a character expression.
Similar questions
World Languages,
4 months ago
Computer Science,
4 months ago
Math,
4 months ago
Biology,
9 months ago
Physics,
9 months ago
Geography,
1 year ago
Physics,
1 year ago