if we have this code for files
my question is on the code:why we check again with if and feof?( we are in the while loop so we have already !feof(from) )Code:while(!feof(from); ch=fgetc(from); if(ferror(from){ printf("error reading source file\n"); exit(1); } if(!feof(from)) fputc(ch,to)/*IN THIS line why we check again with feof? */ if(ferror(to){ printf("error writing destination file\n"); exit(1); } }