I don't know what the condition for my while loop needs to be. I just want it to read over a file of numbers (800+) and print those numbers out to the user.
Code:
#include <stdio.h>
#define ALL_NUMS 800
main(void)
{
FILE *fptr;
char c;
char file_name[20];
int i, j;
printf("Please enter the name of the file containing the set of numbers you wish to sort.\n");
scanf("%s",file_name);
fptr=fopen(file_name,"r");
if(fptr == NULL){
fprintf(stderr, "Can't open input file.\n");
exit(1);
}
while(){
c=fgetc(fptr);
printf("%c",c);
}
fclose(fptr);
return 0;
}