...
| Code Block | ||
|---|---|---|
| ||
char buf[1024]; FILE *fptrfile; /* fptr initialized to someInitialized file */ if (fgets(buf, 1024, fptrfile) == NULL) { /* set error flag and continue */ } printf("Read in: %s\n", buf); |
...
| Code Block | ||
|---|---|---|
| ||
char buf[1024]; FILE *fptrfile; /* fptr initialized to someInitialized file */ if (fgets(buf, 1024, fptrfile) == NULL) { /* set error flag and continue */ strcpy(buf, "fgets failed"); } printf("Read in: %s\n", buf); |
...