What is the difference between a conditional statement and looping statement in C?
- The conditional statement will execute only once if the situation is correct while the loop will execute repeatedly unless the situation is false.
Types of Loops in C
1. Entry Controlled Loops in C: In this type of loop, the test condition is checked before entering into the loop body. If the test condition is not true, then the body of the loop will not be executed.
|Entry Controlled Loops in C|
2. Exit Controlled Loops in C: In this type of loop, the test condition is checked at the end of the loop of the body that means loop body will execute unconditionally at least once.
|Exit Controlled Loops in C|
- Exit controlled loops and entry controlled loops in C is also known as post-test and pre-test loops in C.