Loop Control Statements

A loop (also referred to as an iteration or repetition) is a sequence of statements which is specified once but which may be carried out several times in succession. The code “inside” the loop (the body of the loop) is obeyed a specified number of times, or once for each of a collection of items, or until some condition is met. A block or group of statements executed repeatedly until some condition is satisfied is called Loop. The group of statements enclosed within curly brace is called block or compound…

Read More

Conditional Control Statements

Most programming languages have control flow statements (constructs) which provide some sort of control structures that serve to specify order to what has to be done to perform our program that allow variations in this sequential order: Statements may only be obeyed under certain conditions (conditionals) Statements may be obeyed repeatedly under certain conditions (loops) A group of remote statements may be obeyed (subroutines) Conditional Control Statements are divided in three types: Decision making statements Switch case control statement Loop control statements or repetitions It can actually be argued that…

Read More