Computer Science, asked by Chsran7889, 1 year ago

when to use switch case in c++?

Answers

Answered by vibhash31
14
The constant-expression for a case must be the same data type as the variable in the switch, and it must be a constant or a literal. When the variable being switched on is equal to a case, the statements following that case will execute until a break statement is reached.

Hope it helps....
Please Mark me as Brainliest

jainshruti639: If u have same variable and check out variable to different data instead of using if else if condition u can go through a switch case statement
Answered by Anonymous
1
hi....
The constant-expression for acase must be the same data type as the variable in theswitch, and it must be a constant or a literal. When the variable being switched on is equal to a case, the statements following that case will execute until a break statement is reached.
Similar questions