puts(S) 6 January 1993 puts(S) Name puts, fputs - put a string on a stream Syntax cc . . . -lc #include <stdio.h> int puts (s) char *s; int fputs (s, stream) const char *s; FILE *stream; Description The puts function writes the null-terminated string pointed to by s, fol- lowed by a new-line character, to the standard output stream stdout. fputs writes the null-terminated string pointed to by s to the named out- put stream. Neither function writes the terminating null character. Diagnostics Both routines return EOF on error, which occurs if the routines try to write to a file that has not been opened for writing. Notes The puts function appends a new-line character while fputs does not. See also ferror(S), fopen(S), fread(S), printf(S), putc(S), stdio(S) Standards conformance fputs and puts are conformant with: AT&T SVID Issue 2; X/Open Portability Guide, Issue 3, 1989; ANSI X3.159-1989 Programming Language -- C; Intel386 Binary Compatibility Specification, Edition 2 (iBCSe2); IEEE POSIX Std 1003.1-1990 System Application Program Interface (API) [C Language] (ISO/IEC 9945-1); and NIST FIPS 151-1.