Which one makes most sense in the situation.
The for
loop tells you it is most probably a fixed count loop. Starting at 1 ending before a.
The while
loop doesn't imply any such thing, just that it ends once i >= a
(at least from just reading the while (i at the top).
Of course, this isn't a rule and programmers generally do as they see fit, but it does make it easy to read through code without having to backtrack to comprehend some section.