RETURN VALUE

fputc(),
putc()
and
putchar()
return the character written as an
unsigned char
cast to an
int
or
EOF
on error.

puts()
and
fputs()
return a nonnegative number on success, or
EOF
on error.

ATTRIBUTES

For an explanation of the terms used in this section, see
attributes(7).

Interface

Attribute

Value

fputc(),
fputs(),
putc(),
putchar(),
puts()

Thread safety

MT-Safe

CONFORMING TO

POSIX.1-2001, POSIX.1-2008, C89, C99.

BUGS

It is not advisable to mix calls to output functions from the
stdio
library with low-level calls to
write(2)
for the file descriptor associated with the same output stream; the results
will be undefined and very probably not what you want.

SEE ALSO

COLOPHON

This page is part of release 4.13 of the Linux
man-pages
project.
A description of the project,
information about reporting bugs,
and the latest version of this page,
can be found at
https://www.kernel.org/doc/man-pages/.