Switch Case
Switch Case
Instead of writing many if..else statements, you can use the switch
statement.
}
switch(expression) {
case constant-expression :
statement(s);
break; /* optional */
case constant-expression :
statement(s);
break; /* optional */
also executed.
● The default clause inside the switch statement is optional.
Write a C program to find maximum
between two numbers using switch case
Write a C program to check even or odd
number using switch case
Write a C program to check positive negative
or zero using switch case