CONTR
OL
STRUCT
URE
4.1 CONTROL STATEMENTS
C++ has three types of control statements
:
1 Selection/Decision Making Structure
2 Iteration / Loops
3 Jump
4.2 SELECTION/DECISION
MAKING STRUCTURE
C++ has three decision making structures;
1 ‘if’ statement
2 ‘if-else’ statement
3 ‘switch’ statement
4.2.1 “if” STATEMENT
NESTED “IF” STATEMENT
4.2.2 “if-else” STATEMENT
4.2.3 “else-if” STATEMENT
4.2.4 “switch” STATEMENT
4.3 ITERATION/LOOP
There are three types of loops in C++
1 “for” loop
2 “while” loop
3 “do-while” loop
4.3.1 “for” loop
4.3.2 “while” loop
4.3.3 “do-while” loop
4.4 JUMP STATEMENTS
Following are the jump statements used in C++.
1. break
2. continue
3. goto
4. return
5. exit ()