Sei sulla pagina 1di 1

6.1 Introduction Looping is repetitive execution of specific set of instructions.

In large programs we have to perform same calculation for each set of data, solution using sequential approach is worth lengthy and less efficient. So using looping statements we can represent such problems efficiently and can decrease complexity of our program. C language provides mainly two types of looping structure. Those are top-testing loop and bottom testing loop. In top-testing loop first condition is checked then execution of loop proceed and in second one firstly at once loop executed then condition checked. So bottom-testing loop executed at least once. Looping

top-testing loop

bottom-testing loop

while loop

for loop

do-while loop

Potrebbero piacerti anche