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 non-negative number on success, or EOF on error.
ANSI - C, POSIX.1
It is not advisable to mix calls to output functions from the stdio library with low - level calls to write() for the file descriptor associated with the same output stream; the results will be undefined and very probably not what you want.
write(2), ferror(3), fopen(3), fseek(3), fwrite(3), gets(3), scanf(3), unlocked_stdio(3)