Skip to main content

Posts

Showing posts with the label Switch

Switch-Case in C Program #DOTC_Mdb

Switch-Case in C Program. Hi Everyone, Today we will discuss about Switch – Case statement in C Program.   Before going through Switch – Case program please go through my previous blogs for your reference and it will easy for you to write programs by using Switch- Case. https://dheeraj60.blogspot.com/2020/06/continue-and-break-statement-statement.html https://dheeraj60.blogspot.com/2020/06/while-and-do-while-loop-lop-in-c.html https://dheeraj60.blogspot.com/2020/06/nested-for-loop-with-simple-pattern.html Let’s Start with Switch case: Switch case is similar to conditional statements where we can give multiple conditions in one statement. In other word switch case statement is used when we have multiple options and we need to perform a different work for all option. Although we can do same thing with IF ELSE which we discussed in previous blog but in switch case we can pass multiple option at one time. Syntax for Switch –case is as below :   switch (expression) ​{ ...