Saturday, February 23, 2013

Loops in C Programming Language

Loops are used to change the sequence or flow of the program. The basic behavior of the program is that it starts it from the beginning of the program, executes the particular statement only once and proceeds to the next statement. This behavior is continued till the end of the program is reached. But sometimes we need to execute a particular statement more than once. At this point Loops plays an important role.
Following are the types of Loops we can use in the program:
1) while statement
2) do-while statement
3) for statement

1 comment: