A pretest loop tests its condition before each iteration. A posttest loop tests its condition after each iteration. ... The while loop is a pretest loop and the do-while loop is a posttest loop.
Is a for loop pretest or posttest?
The for loop is a pretest loop, so it evaluates the test expression before each iteration.
What are the posttest loops?
A posttest loop is one in which the block is to be repeated until the specified condition is no longer true, and the condition is tested after the block is executed.