hello everyone.. anyone can explain me how this code works:
what's feof, memset and fgets? thanks so much !Code:#include <stdio.h> #include <string.h> main() { FILE *fp; char buff[255]; fp = fopen("input.txt", "r"); if( fp != NULL ){ while ( !feof(fp ) ){ memset(buff, '\0', sizeof( buff) ); fgets(buff, 255, (FILE*)fp); printf("%s", buff ); } fclose(fp); } }