Difference between while and do while
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
\tBASIS FOR COMPARISONWHILEDO-WHILEGeneral Formwhile ( condition) { statements; //body of loop }do{ . statements; // body of loop. . } while( Condition );Controlling ConditionIn \’while\’ loop the controlling condition appears at the start of the loop.In \’do-while\’ loop the controlling condition appears at the end of the loop.IterationsThe iterations do not occur if, the condition at the first iteration, appears false.The iteration occurs at least once even if the condition is false at the first iteration.Alternate nameEntry-controlled loopExit-controlled loopSemi-colonNot usedUsed at the end of the loop\t