C Menu


Introduction to Control Structures




C provides four general categories of control structures: Sequential, Selection, Iteration and Jumping.

A Sequential Structure is one in which instructions are executed in sequence.


In the Selection Structure, the sequence of the instruction is determined by using the result of the condition. There are also called Decision Making Statements. When we are working with selection statements if condition is "True" then block is executed and if condition is "False" then corresponding block will be ignored. The statements that can be used in this category are if, if-else and switch.


The Iteration Structure is one in which statements are executed repeatedly for a specified number of time or until a condition is met. Iteration statements are most commonly know as loops. Also the repetition process in C is done by using loop control instruction. There are three types of looping statements: For Loop, While Loop and Do-while loop.


Jump Statements interrupt the normal flow of the program while execution and jump when it gets satisfied given specific conditions. The main uses of jump statements are to exit the loops and executes the given or next block of the code, skip the iterations of the loop, change the control flow to specific location, etc. There are 4 types of Jump statements: Break Statement, Continue Statement, Goto Statement and Return Statement.


Next Topic :Decision Statements