#include #include #include int main() { FILE *fs1, *fs2; char *str = (char *)malloc(256*sizeof(char)); fs1 = fopen("./testfile", "r"); if (fs1 == NULL) { printf("error opening first inputfile\n\n"); return -1; } while (!feof(fs1)) { fscanf(fs1, "%s", str); printf("Word from file: %s\n", str); } // end while fclose(fs1); return 0; }