what is loop


Brief note on looping

what is loop?

It is a process of executing one or more statement or a set of statements repeatedly until some specific condition is specified.

Looping or iteration involves four clear cut steps, initialization, condition, execution and updation.


Depending on the placement of condition

  1.                 Entry controlled loop: while loop, for loop
  2.                 Exit controlled loop: do…while loop.

Depending on the no of  times statements are executed

  1.                 Finite loop
  2.                 Infinite or sentinel loop


No comments

Powered by Blogger.