fputs
Writes a character string to the output stream
#include <stdio.h> int fputs ( const char *buf, FILE *fp);
If you have linked your program with NWPRE.OBJ, fputs returns the number of character put on success.
If you have linked your program with PRELUDE.OBJ, fputs returns -1 for failure and zero for success.
If an error occurs, errno is set.
The fputs function writes the character string pointed to by buf to the file designated by fp. The terminating NULL character is not written.
For backward compatibility with versions of CLIB.NLM previous to version 4.11, applications should link to PRELUDE.OBJ. For ANSI or POSIX compliance, applications should link to NWPRE.OBJ. Applications cannot link to both.
#include <stdio.h> main () { FILE *fp; char buffer [80]; fp = fopen ("data.fil", "r"); while (fgets (buffer, 80, fp) ) != NULL) fputs (buffer, stdout); fclose (fp); }