All programming languages utilise program constructs. They are used to control the order in which statements are executed. There are a number of programming constructs. The sequential statement does not contain any test condition. It refers to a series of statements that are performed in sequential order. Control statements control the flow of the program execution either by repeating or skipping the set of statements based on the result of the test condition. A selection statement is a control statement that allows choosing between two or more execution paths in a program. A Selection statement is a control statement that executes according to the result of the test condition.
In the switch statement the value of the expression is compared with each of the values in the case statements. Once the value of the expression matches any case value then the sequence of statements following that case value is executed. Iteration or looping allows a certain set of instructions to be performed repeatedly until a certain condition is fulfilled. Various types of looping statements are for loop, while loop and do while loop. A for loop is a repetition control structure that allows user to efficiently write a loop that needs to execute a specific number of times. A while loop is a control structure that allows user to repeat a task a certain number of times. Each time the body of a loop is executed, a pass is made through the loop. This pass is called an iteration.