printf
and putchar
are both stdio functions, so they both write to the same FILE
handle (rather than directly to the file descriptor).
However, printf
is far heavier since the first argument is a format string that needs to be scanned for replacement expressions and escapes.
So, both printf("\n")
and putchar('\n')
will do the same thing, but the latter will be faster.