C for beginners: Introduction

Control Instructions in C

As the name suggests the “Control Instructions” enable us to specify the order in which the various instructions in a program are going to be executed by the computer. In other words, the control instructions determine the “flow of control” in a program. There are four types of control instructions in C. They are:

  • Sequence Control Instruction
  • Selection or Decision Control Instruction
  • Repetition or Loop Control Instruction
  • Case Control Instruction

The “Sequence Control Instruction” ensures that the instructions are executed in the same order in which they appear in the program. “Decision and Case Control” instructions allows the computer to take a decision to which instruction is going to be executed next. The “Loop Control” instruction helps the computer to execute a group of statements repeatedly. In the following lessons we are going to learn these instructions in detail.