PUTS(3) Library Functions Manual PUTS(3)

putsput a string on standard output

#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 . The terminating null byte is not written.

The and fields of the file will be marked for update between the successful execution of and the next successful completion of a call to or on the same stream or a call to or .

Upon successful completion, puts() returns a non-negative number. Otherwise it returns EOF, sets an error indicator for the stream and errno is set to indicate the error.

Refer to fputc(3) .

None.

The puts() function appends a newline character, while fputs(3) does not.

None.

fputs(3) , fopen(3) , putc(3) , stdio(3) , <stdio.h> .

Derived from Issue 1 of the SVID.

February 1997 posix.fail