amores perros wrote:
> #1) What principles govern when hello.c print_help calls printf vs. puts
> vs. fputs?
I think that will all be attributable to the style of the author for
those parts of the code. It looks to me that originally the code used
a mixture of printf and fputs calls and that the calls that simply
outputed a blank line were recently changed to be a puts call instead.
It is shorter, so I imagine that is why it was done.
> #2) What is the difference between puts("") and printf("\n") ?
There isn't any effective difference. It would simply be a matter of
style and taste. Both call the standard I/O libc functions and libc
will end up doing the same thing in both cases.
Bob