State whether each of the following is true or false. Explain why.
- The default case is required in the switch selection statement.
- The break statement is required in the last case of a switch selection statement.
- The expression ( (x > y) && (a < b ) ) is true if either x > y is true or a < b is true.
- An expression containing the || operator is true if either or both of its operands are true.
- The comma (,) formatting flag in a format specifier (e.g., %,20.2f) indicates that a value should be output with a thousands separator.
- To test for a range of values in a switch statement, use a hyphen () between the start and end values of the range in a case label.
- Listing cases consecutively with no statements between them enables the cases to perform the same set of statements.
Comments
Leave a comment