Control Statements in C

Control Statements in C - Definition and Usage

  • In C- Programming Control statements are used for defining and enabling the flow of program control;
    i.e., the order in which the instructions in a program must be executed.
  • They make it possible to make decisions, to perform tasks repeatedly or to jump from one section of code to another.
  • There are three types of control statements in C :
    1. Decision making statements
    2. Selection statements
    3. Looping statements
C Control Statement

Decision making statements :

  • In C-Programming Decision making statements are used to specify the order in which statements are executed.
  • There are three different types of decision making statements are,
    1. If statement
    2. If-else statement
    3. Else-if statement

Selection statements :

  • In C-programming the switch statement is used for multiple way selections that will branch into different code segments based on the value of a variable or expression.
  • This expression or variable must be of integer data type.

Looping statements :

  • In C-Programming the statements which appear in the source code only once but execute many times, are called loops.
  • Repeated executions of certain statements are popularly known as loops.
  • Almost all the programming languages support looping instructions.
  • In C program there are three different types of looping statements : are
    1. while
    2. do while
    3. for

View More Quick Examples

Related Searches to C Control Statement