PUTS(3S) — STANDARD I/O LIBRARY
NAME
puts, fputs − put a string on a stream
SYNOPSIS
#include <stdio.h>
puts(s)
char ∗s;
fputs(s, stream)
char ∗s;
FILE ∗stream;
DESCRIPTION
puts writes the null-terminated string pointed to by s, followed by a newline character, to the standard output stream stdout.
fputs writes the null-terminated string pointed to by s to the named output stream.
Neither function writes the terminal null character.
DIAGNOSTICS
Both routines return EOF on error. This will happen if the routines try to write on a file that has not been opened for writing.
SEE ALSO
fopen(3S), putc(3S), printf(3S), ferror(3S), fread(3S)
NOTES
puts appends a newline while fputs does not.
Sun Release 3.2 — Last change: April 15 1986