difference between while do while and for loop《《《 c++》》》 help pls
sidhant41:
hello mahira
Answers
Answered by
3
C++ provides three loop : for, while and do-while
The entry-controlled loops impose control at the time of entry into the loop by testing the text-expressions before entering into a loop.
☆ The for and while loops are entry-controlled
loops.
☆ The do-while loop exit-controlled.
☆ The do-while is executed at least once always as it evaluates the test expressions at the end of the loop.
☆ A while loops is also infinite loop.ifor it's loops controlled variable is not updated.
☆ A while loops also be infinite loop.
☆The loop-control elements in a for loop are optional.
☆ A for loop can have multiple intialization and update expression separated by commas.
I Hope it help you ☺
The entry-controlled loops impose control at the time of entry into the loop by testing the text-expressions before entering into a loop.
☆ The for and while loops are entry-controlled
loops.
☆ The do-while loop exit-controlled.
☆ The do-while is executed at least once always as it evaluates the test expressions at the end of the loop.
☆ A while loops is also infinite loop.ifor it's loops controlled variable is not updated.
☆ A while loops also be infinite loop.
☆The loop-control elements in a for loop are optional.
☆ A for loop can have multiple intialization and update expression separated by commas.
I Hope it help you ☺
Similar questions