A pre-test or entry-condition loop
(Display Listing 2.)
A while loop is a pre-test or entry-condition loop.
The conditional test is performed before the code in the body of the loop is executed.
If the test returns true:
The code in the body of the loop is executed and the test is performed again.
If the test returns false:
The code in the body of the loop is skipped and control exits the loop.
Therefore, if the test returns false the first time that it is performed:
The code in the body of the loop won't be executed.