|
|
|
|
|
by boredzo
5551 days ago
|
|
The weirdest part, looking at it five years later, is that the page shows usage of and talks about puts, while the “Best Possible” code in the zip archive uses fputs. Unless anyone can think of a reason not to use puts, I'll change the zipped “Best” example over to use it after I get it both working and failing properly. |
|
The result of this is that I always use fputs to write a plain C string to a stdio handle, specifying stdout explicitly and adding newlines if needed, and I ignore puts entirely, much like I ignore gets. The convenience is not worth the subtle error-causing asymmetry and associated mnemonic pain, especially if that code may ever have to write somewhere other than stdout.