while ( i < 1000 && fscanf(fin, "%d",&c) == 1 )
would be an improvement.

At least it won't smash the array with a large file, or lock up if the file contains junk.