The C standard provides two functions, puts
and fputs
, with puts(s)
behaving as fputs(s, stdout)
except that it additionally appends a newline:
The
puts()
function shall write the string pointed to bys
, followed by a<newline>
, to the standard output streamstdout
.
What is the rationale for this difference in behavior between puts
and fputs
?