NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO
#include <stdio.h>int puts(const char *s);
The puts() function writes the string pointed to by s, followed by a NEWLINE character, to the standard output stream stdout (see intro(3)).
The fputs() function writes the null-terminated string pointed to by s to the named output stream.
Neither function writes the terminating null character.
On success both routines return the number of characters written; otherwise they return EOF.
The puts() and fputs() functions will fail if either the stream is unbuffered or the stream's buffer needed to be flushed and:
The file is a regular file and an attempt was made to write at or beyond the offset maximum.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
MT-Level | MT-Safe |
write(2), intro(3)), fclose(3C), ferror(3C), fopen(3C), printf(3C), putc(3C), stdio(3C), attributes(5)
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO