Quote Originally Posted by gooey_kablooie
If you want to test for feof then it should be scanned first. For your code its scanning it for the first time and the values are stored in the variables. For the second its encountering an EOF but it will exit only when it loops again and hence it uses the already stored values (after the first iteration) the second time.
That is a good observation, though instead of using a controlled infinite loop simply using the return value of fscanf() is likely to be more readable, e.g.,
while ( fscanf( fPtr, "%d %s %f", &accountNum, name, &balance ) == 3 ) {
    /* ... */