You are on page 1of 12

Decision Making -

Branching
Prof. M Nataraja Suresh
Branching
• Branching - a program breaking the sequential flow and making a
jump to another part of the code
• branching is based on a particular condition, it is known as
conditional branching.
• If branching takes place without any decision, it is known as
unconditional branching.
• Control changing / Decision making statements
• if statement
• switch statement
• Conditional operator statement
If Statement

Various Forms of if statements


If Statement
If-else Statement
Nesting of If-else Statement
Else if Ladder
Else if Ladder
Switch – Multiway Decision Statement
Conditional Operator (? :)

You might also like