A statement that allows the execution of statements or groups of statements in a repeated way is defined as a loop.
The following diagram explains a general form of a loop.
There are 4 types of loop statements in C.
- While loop
- For Loop
- Do…While Loop
- Nested Loop