Control Statement

 Control statements in C

Control statements are executed sequentially in the order in which they appear in the program. But sometimes we may want to use a condition for executing only a part of program. Also many Situation arise where we may want to execute some statements several times. In other word , the control instruction determine the 'flow of control' in  a program.

There are different types of Control statement in C Language :

Sequence Control statement 

The Sequence Control statement ensures that the instructions are executed in the same order in which they appear in the program. 

A group of statements enclosed within a pair of curly braces {}. The statements inside a block are executed Sequentially.  The general form is :

statement1
statement2
.................
.................

For example :

l = 4 ; 
b = 2;
area = l*b;
printf("Area=%d", area);

In the above example first declare the value of l and b after that find area = l*b then print. 

more about Type of Control statements coming soon ............ 

(i) If-else statement 

πŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒThank youπŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒ

Comments

Popular posts from this blog

18 Amazing programs in C.