What restrictions are placed on the values of each case of a switch statement

During compilation, the values of each case of a switch statement must evaluate to avalue that can bepromoted to an int value.

Showing Answers 1 - 1 of 1 Answers

1.The compiler does not initialize auto and register variables at the beginning of a switch body where as we can put data definitions at the beginning of the switch body.
2.We cannot use a switch statement to jump over initializations.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions