Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
rep_lodsb
3 months ago
|
parent
|
context
|
favorite
| on:
Lesser known tricks, quirks and features of C
Useless use of printf; what's wrong with "puts(str)"?
shawn_w
3 months ago
[–]
puts() adds a newline at the end. gcc will happily turn printf("%s\n", str) into puts(str), though.
I've never tested to see if printf("%s", str) becomes the equivalent fputs(str, stdout)
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: