Looping Statements in C | while, do-while and for Loop In C language, looping statements allow you to perform repeatition of a particular block of code.. In the process of looping, basically 4 steps are performed: Initialization of control variable. Execution of statements in the loop. Updation of control variable. Condition Testing. Looping statements can be easily divided into 2 categories: Entry Control Loop: Entry Control loop tests the condition before execution. If the condition is false then the loop gets terminated. Example : while loop for loop Exit Control Loop: In this looping, condition is tested after the execution of statements. It means that , first time, execution of statement is done unconditionally. Example: do-while loop Let us see all the three looping statements in detail with example. 1. The while statement : The while statement is an entry controlled looping statement which tests the condition after the initialization of control variable. If t...
Computer Studies , Computer Tricks and General Knowledge