Control Statements in C Language
This “Control Statements in C Language” page is giving basic introduction to control structures in C language including types of statements, difference between sequential and control statements.
- Control structures are one of the most fundamental concepts in any programming language you will come across.
- To write logic in any language, you must be good at control structures of the language.
- A statement is a line of instruction in the program that ends with ” ; “.
- This concept of changing the order in which statements are executed is called program control and is accomplished by using program control statements. This is how we can control the program flows.
- A statement may be
1) Declaration of variable
2) Initialization of variable
3) An expression
4) Function call
KEYWORDS related to Control Structures :
if , else, switch, case, return, break, continue, for, default, goto, do,while
Sequential statements :
The statements which are executed top to bottom, one by one referred as sequential statements.
a = 10;
b = 20;
c = a+b;
Control statements :
The statements which are executed randomly and repeatedly depends on specific condition, referred as control statements.