Switch in C Language – tccicomputercoaching.com
- February 27, 2020
- Posted by: Riddhi Dhandha
- Category: switch in c
What is Switch?
Switch is used to select any one from multiple choice. The switch statement allows us to execute one code block among many alternatives.
A switch statement tests the value of a choice variable and compares it with multiple cases. Once the case match is found, a block of statements associated with that particular case is executed. Each case in a block of a switch has a different name/number which is referred to as an identifier.
// printf (“enter ypour choice\n”);
Printf (“1 paneer makhni \n”);
printf (“2 paneeer bhurji \n”);
printf (“3 paneer mutter”);
printf (“\nenter your choice”);
scanf (“%d”, &ch);
switch ( ch )
printf (“Your paneer makhni is ready\n”);
printf (“Your paneer bhurji is ready \n”);
printf(“Your paneer mutter is ready\n”);
enter your choice:
Your paneer bhurji is ready
Call @ 9825618292
Visit @ http://tccicomputercoaching.com/