Is there any logic behind puts() adding a newline but fputs() not doing it?
Or was it just a design f*** up in the early days of C?
The C standard library is not a model of consistency, and I
don't recall anyone claiming that it is. It evolved over a period
of several years, and the committee had to standardize existing
practice. (They could have invented a new and more consistent runtime
library, but that would have hindered adoption of the standard.)
My guess (and it's only a guess) is that puts() was designed first,
and adding a newline to text written to stdout was thought to be
convenient (and in fact it *is* convenient), and that fputs() was
added later, and it was thought that having tighter control over
what's written to a file was more important.
Note that you can print a string to stdout either with or without
an added newline:
puts(s); /* adds newline */
fputs(s, stdout); /* doens't add newline */
We don't have the same option for files other than stdout, which
is admittedly inconsistent; see above.
Oh, and you might consider being less rude. The people who have
responded to your question are simply trying to answer your question;
reacting as if the inconsistency is their fault is not constructive.