Explanation of the source code
(Display Listing 2.)
This program does not declare and initialize a variable named index as was the case for the while counting loop shown in Listing 1.
The body of the loop does not contain a statement to update the index as was the case for the while counting loop shown in Listing 1.