Switch Case Statement in C
SWITCH CASE STATEMENT IN C (MENU DRIVEN PROGRAMMING IN C ) Switch Case In General . . . . Menu Driven Programs in C Language can be written, in most easiest way using "Switch Case" Statement. Switch case statements can be used as alternative for "if... else ladder", where you can choose to execute single block of code among multiple blocks. Then question remains..... what is difference between if... else ladder and Switch case..? Lets understand this with simple example. You have a Electric Switch Board with around 20 switches on it. If someone ask you to switch on fan, what would you have done in this situation when you don't know which switch belong to fan. Now suppose that, 18th Switch is fan's switch. you might have start checking from first switch and after checking first 17 switches you would have come to know that 18th switch belongs to fan. Now, what if same condition occurs once again ..?. In this case you would have switched on 18th Switch directl...