Please enable JavaScript.
Coggle requires JavaScript to display documents.
Selection Statements - Coggle Diagram
Selection Statements
Deifinition
Selection statement execute a set of instructions only one.select one or another
Selection depending on condition is satisfied
3 types of control statement available in C
Sequence structure (straight line paths)
Selection structure (one or many branches) such as if,if else,nested if,if-if-else,if-else-if and switch-case-break
Repetition (loop) e repetition of a set of activities such as for,while and do-while
Types of control statements
if statement
if-else statement
nested if statement
switch statement
3 selection statements
if
if-else
Switch.......case
Control statements
Statement that determines whether other
Statements will be executed. It also know as decision making the result of decisions
In these statements one group of statement depending on the result may be in the form of two
Expressions in True or False
Selection statement
Is a control statement that allows choosing between two or more execution paths in a program
Most modern programming languages include one way,two way and n way (multiple selectors)
a) if statement with no else is a one way selector
b) if else statements is a two way selector
c) switch or case statements is an n way selector