Is there an easy way to check if a file is empty. Like if you are passing a file to a function and you realize it\'s empty, then you close it right away? Thanks.
E
char ch; FILE *f = fopen("file.txt", "r"); if(fscanf(f,"%c",&ch)==EOF) { printf("File is Empty"); } fclose(f);