while & for
Whether to use while or for is largely a matter of personal preference. For example, in
while ((c = getchar()) == ' ' || c == ’ \n' || c == '\t')
; /* skip white space characters */
there is no initialization or re-initialization, so the while is most natural. The for is preferable when there is a simple initialization and increment, since it keeps the loop control statements close together and visible at the top of the loop. This is most obvious in
for (i = 0; i < n; i++)
…
[The C Programming Language p.60-61]