Computer Science, asked by ArpitaDas1, 1 year ago

Syntax for switch case?

Answers

Answered by ImRitz
12
Syntax for switch case:-

switch(expression) {

case constant-expression :
statement(s);
break; /* optional */

case constant-expression :
statement(s);
break; /* optional */

/* you can have any number of case statements */
default : /* Optional */
statement(s);
}

ArpitaDas1: Thanks
ImRitz: Welcome
rosaline45: copied
rosaline45: from https://googleweblight.com/i?u=https://www.tutorialspoint.com/cprogramming/switch_statement_in_c.htm&grqid=5Vdt_Ppb&hl=en-IN
Answered by Anonymous
4
switch(expression) { case constant-expression : statement(s); break; /* optional */ case constant-expression : statement(s); break; /* optional */ /* you can have any number of case statements */ default : /* Optional */ statement(s); }
Similar questions