The second one generates less loops.
My example is still better.
I suggest using a for loop for all incremental type of loops.
While loops are generally used in combination with functions that work with a more true/false statement ( != 0 or == 0 ), for example feof().