0% found this document useful (0 votes)
21 views4 pages

03 C Decision Making Statement

Uploaded by

rahul khandelwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views4 pages

03 C Decision Making Statement

Uploaded by

rahul khandelwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

C Decision Making

• Conditional/Decision making statements in C programming are


used to make decisions based on the conditions.
• There are the following variants of if statement in C language.
 If statement
 If-else statement
 If else-if ladder
 Nested if
C Decision Making
C Switch Statement
• The switch statement in C is an alternate to if-else-if ladder
statement which allows us to execute multiple operations for the
different possible values of a single variable called switch
variable.
C Switch Statement
• Rules for switch statement in C language:
 The switch expression must be of an integer or character type.
 The case value must be an integer or character constant.
 The case value can be used only inside the switch statement.
 The break statement in switch case is optional. If there is no
break statement, then all the cases will be executed after the matched case.

You might also like