Computer Science, asked by tiwarichanda985, 1 year ago

What is the significance of default clause in a switch statement?
Please give answer in ur own words ​

Answers

Answered by nain31
2
 \bold{SWITCH \: CASE}

Switch case is a conditional stament in which there are number of cases moduled in opening and closing braces.

Where each case has its own function.

It has

◼Switch variable-controlling variable ,it is the one from which the case values are matched.

◼Break statement- Its a terminatot statement use to break the execution of the other cases if the value of one cade had matched with the given value.

▶Its used at the end of each case.

◼Default statement

 \bold{DEFAULT \: CASE}

If the value doesnt match with any of the cases given then the default module executes.Its also used to display error statement to the user if none of case value matches with the given block value.
Similar questions