5
Loop Control Statements
CHAPTER OUTLINE
5.1 WHAT IS A PROGRAM LOOP?
A program loop is defined as a block of statements, which are frequently executed for certain number of times even though these statements come into view once in a program. This loop is also known as iterative structure or repetitive structure.
TABLE 5.1 Loops in C
for | while | do-while |
---|---|---|
for(expression-1; expression-2; expression-3)statement; | expression-1;while(expression-2){statement;expression-3;} | expression-1;do{statement;expression-3;}while(expression-2); |
The C ...
Get C Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.