In programming normally the sequence of instruction is no limited to linear. We need to repeat several statements or we need to jump from one part of the program to another part of the program. For this purpose the control structures are used.
The following are the types of control structures.
Conditional structure:
If and Else statement is used in the programming for conditional structures. This statement uses a specific condition check. If this condition is true the code following the If statement will be executed otherwise the Else portion will be executed. The Else part of the If state is optional. The syntax of this condition structure varies language to language.
Iteration structure:
Iteration structure or loops are used to repeat the instructions. There are mainly three types of loops available. For Loop, While Loop, do while loop. These loops repeat the instruction until a specific condition is true.
Jump statements:
These statements include Break, Continue and Goto instructions. These instruction jumps from one portion of the program to another portion of the program. The function calling can also be included in this category.
Selective structure:
Switch statement is called selective structure. In this we provide a number of options and take decision depending upon the choice.
The following are the types of control structures.
Conditional structure:
If and Else statement is used in the programming for conditional structures. This statement uses a specific condition check. If this condition is true the code following the If statement will be executed otherwise the Else portion will be executed. The Else part of the If state is optional. The syntax of this condition structure varies language to language.
Iteration structure:
Iteration structure or loops are used to repeat the instructions. There are mainly three types of loops available. For Loop, While Loop, do while loop. These loops repeat the instruction until a specific condition is true.
Jump statements:
These statements include Break, Continue and Goto instructions. These instruction jumps from one portion of the program to another portion of the program. The function calling can also be included in this category.
Selective structure:
Switch statement is called selective structure. In this we provide a number of options and take decision depending upon the choice.