Electrical and Computer Engineering
31 of 31
UAH
CPE 112
Testing and Debugging Hints
•Put a break statement at the end of each case alternative in a switch statement.
•Case labels in a switch statement are made up of values, not variables.
•A switch expression cannot be a floating-point or string expression.
•A for loop must have semicolons, whether the expressions exist or not.