WHILE
DO..WHILE
FOR
EXITING FROM A LOOP
(BREAK,CONTINUE, GOTO)
Loops
While
While
While
While
Do…While
D0…While
Do…While
Do…While
For Loop
For Loop
For Loop
For Loop
For Loop
For Loop
For Loop
Break Statement
 It is an jump instruction and can be used inside the
switch and loop statements.
 The execution of the ...
Break Statement
Break Statement
Break Statement
Break Statement
Break Statement
Break Statement
Continue Statement
 It is a jump statement.
 It is used only inside the loop.
 Its execution does not exit from the loo...
Continue Statement
Continue Statement
Continue Statement
Continue Statement
Continue Statement
Goto Statement
 It is used the alter the normal sequence of flow by
transferring the control to some other part of the
pr...
Goto Statement
Goto Statement
Goto Statement
Goto Statement
Upcoming SlideShare
Loading in …5
×

Loops in C

6,136 views

Published on

This slide give the introduction to the various loops available in C Programming. Which include while loop, do while loop and for loop.

Published in: Education, Business, Technology
0 Comments
18 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
6,136
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
1,040
Comments
0
Likes
18
Embeds 0
No embeds

No notes for slide

Loops in C

  1. 1. WHILE DO..WHILE FOR EXITING FROM A LOOP (BREAK,CONTINUE, GOTO) Loops
  2. 2. While
  3. 3. While
  4. 4. While
  5. 5. While
  6. 6. Do…While
  7. 7. D0…While
  8. 8. Do…While
  9. 9. Do…While
  10. 10. For Loop
  11. 11. For Loop
  12. 12. For Loop
  13. 13. For Loop
  14. 14. For Loop
  15. 15. For Loop
  16. 16. For Loop
  17. 17. Break Statement  It is an jump instruction and can be used inside the switch and loop statements.  The execution of the break statements causes the control transfer to the statement immediately after the loop.
  18. 18. Break Statement
  19. 19. Break Statement
  20. 20. Break Statement
  21. 21. Break Statement
  22. 22. Break Statement
  23. 23. Break Statement
  24. 24. Continue Statement  It is a jump statement.  It is used only inside the loop.  Its execution does not exit from the loop but escape the loop for that iteration and transfer the control back to the loop for the new iteration.
  25. 25. Continue Statement
  26. 26. Continue Statement
  27. 27. Continue Statement
  28. 28. Continue Statement
  29. 29. Continue Statement
  30. 30. Goto Statement  It is used the alter the normal sequence of flow by transferring the control to some other part of the program unconditionally.  It is followed by the label statement which determine the instruction to be handled next after the execution of the goto statement.
  31. 31. Goto Statement
  32. 32. Goto Statement
  33. 33. Goto Statement
  34. 34. Goto Statement

×