Which is better (in both performance and best practice) for printing only a newline:
putchar('\n')
or puts("")
From what I understand, putchar
outputs a single character and puts
outputs a string of characters. Forget about printf
.
I'm inclined to use puts
because it's shorter, but doing ("")
just feels wrong.
Which is faster and better?