Lec 8 Programming Fundamentals (3)
Lec 8 Programming Fundamentals (3)
Lecture 08
Week 05
Ms. Noor-ul-Huda
Senior Lecturer-I
Department of Computer Science
College of Computer Science and Information Systems
[email protected]
Lecture outcomes:
Iteration:
◦ While loop
◦ For loop
◦ Do-while loop
◦ Selection of proper loop type
Loops in C
• C has three loop statements: the while, the for, and
the do…while.
• The first two are pretest loops, and the the third is a
post-test loop.
• We can use all of them for event-controlled and
counter-controlled loops.