3 ms·
I mean, the function for straight printing is puts; I don't know why people keep using the much more complicated printf in cases where no formatting is involved
by Sniffnoy 3y ago
I mean, the function for straight printing is puts; I don't know why people keep using the much more complicated printf in cases where no formatting is involved.
Edit: OK, I guess puts includes a newline, so you'd need to use fputs if you don't want that (although this example includes one). Still, both of those are much less complicated than printf!
- izoow 3y agoConsistency. Having intermixed puts and printfs throughout the code looks pretty bad. Also, every compiler replaces printf of a literal ending with \n with a puts anyway.