Program Control Structures

Read Complete Research Material

PROGRAM CONTROL STRUCTURES

Three Program Control Structures

Three Program Control Structures

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.

Details

In all three cases, the target of the communication, in its visual form, is a human being. The goal is to transfer to him/her, as efficiently as can be accomplished, the greatest degree of understanding, in advance, of how the process will unfold in time. In poetry, this human target is the reader. In music, it is the performer. In programming, it is the program user.

Now, you may object that the target of communication of a program is not a human but a computer, that the program user is only an irrelevant intermediary, a lackey who feeds the machine. This is perhaps the case in the situation where the business executive pops a diskette into ...
Related Ads