Control Statements in C Programming language

Conditional Statement in C-language

In this article we will be going to take only overview of Control Statements in C language like What is Control statements in C and types of control statements in C language.

Introduction to Control Statements in C

In C programs, statements are performed sequentially within the order which they appear within the program.But from time to time we can also need to use a condition for executing simplest a part of program. Also many situations get up where we may additionally need to execute a few statements numerous times.Control statements allow us to specify the order wherein the various commands in the program are to be done. This determine the flow of control. Control statements define how the manage is transferred to different parts of the program.

C language helps four varieties of control-statements, which are as-

1. If ....
2. switch... 
3. Goto.....
4. Loop
     -for loop
     -while loop
     - do while loop

Compound Statement or Block in C:

A compound assertion or a block is a group of statements enclosed within a pair of curly braces{} 
The statements within the block are finished sequentially. The trendy shape is-

{
statement 1;
statement 2;
................;
................;
}

Such that-

{
1=4;
b=2;
place=l*b;
printf("%d",location) ;
}

A compound announcement is syntactically equal to a single declaration and might appear anywhere in the program where a single statement is permitted.

Conclusion:

The purpose of this article to give the introduction about Control Statements in C-language.I hope after reading this article you have well known about control Statement of C language but, if you any queries in this article then feel free comment below.
________________________________________________

Post a Comment (0)
Previous Post Next Post