About Me

header ads

PROGRAMMING STATEMENTS IN C


---------------: PROGRAMMING STATEMENTS IN C: -----------------

There are 4 basic structure used in c programming language.
1 SEQUENTIAL
2 CONDITIONAL
3 ITERATIVE
4 PROCEDURE 

SEQUENTIAL :-
Sequential structure is composed of statements executed one after another.
Example Showed in Figure-



CONDITIONAL :
The conditional structure (selection ) select one set of statements out of two sets depending upon certains conditions may result either “true” or “false”.
Example :- if(10<5)
then print 10
Otherwise 5
 



ITERATION :-
The iterative structure repeat a set of statements while certain condition is true .
For iterative structure the condition must be finite ,it will not be infinite otherwise it become infinite iterative.





PROCEDURE :
The procedure enabled you replaced a set of statements with a single statement . ‘c’ procedure are called functions . they allow us to write parts of a program separately , then assembly into final program.