Computer Science, asked by PragyaTbia, 1 year ago

In switch statement, case values must be in ascending order? State whether the statement is True (or) False And Justify it

Answers

Answered by afrujaKawsar48
1
here is your answer.

it is false because in switch statement we can't arrange case values in ascending order. .


hope it helps you.
Answered by smartbrainz
1

In switch statement, case values must be in ascending order. The statement is False

Explanation:

A switch is a conditional statement used to check the variable value and compares it with matching cases. Once the match case is found, a block of statements connected with that specific case is executed.

Each case in a block of a switch has a different name/number which is referred to as an identifier. The value provided by the user is compared with all the cases inside the switch block until the match is found. Case labels must be constants and unique.

Similar questions