Control instructions in C

What is control instruction?
   As the name suggests the 'Control Instructions' enable us to specify the order in which the various instructions in a program are to be executed by the computer. In other words, the control instructions determine the 'flow of control' in a program.
    Program is a set of instructions. We know that each instruction of the program is executed by the processor. The processor executes instructions one by one. Whatever we write in our program is executed in the same order as they appear in the program. We can say processor executes instructions in a sequential manner. At a particular instant, the processor is executing some line of code, we say control of the processor is on that line. Processor’s control moves from one line to another. This movement of control is known as the flow of the program.

There are four types of control instructions:
  1. Decision control instruction
  2. Iterative control instruction
  3. Switch case-control instruction
  4. goto instruction
Image result for Control Instructions in c
Add caption

No comments:

Post a Comment

Featured Post

Core and Advance Python

                      Language Fundamentals