Answer the following statements true (T) or false (F)

1) 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.
2) Listing cases consecutively with no statements between them enables the cases to perform the same set of statements.


1.False. The switch statement does not provide a mechanism for testing ranges of values, so every value that must be tested should be listed in a separate case label.
2. True.

Computer Science & Information Technology

You might also like to view...

The static method ________ of class String returns a formatted String.

a. printf. b. format. c. formatString. d. toFormatedString.

Computer Science & Information Technology

Which of the following is not one of the basic control structures?

a. Sequence b. Modularization c. Selection d. Repetition

Computer Science & Information Technology

When const is used at the end of a function prototype (preceding the semicolon), the following are true EXCEPT

A. const must also be placed at the end of the function heading of the corresponding function in the implementation file B. when the function is called from the main program, it is called the same way as if const were not even used C. the returned value must be a literal number instead of the value of a variable D. it can aid in debugging

Computer Science & Information Technology

Once a constraint is added to Solver Parameters, it cannot be deleted

Indicate whether the statement is true or false

Computer Science & Information Technology