Difference between fprintf, printf and sprintf?
https://stackoverflow.com/questions/4627330/difference-between-fprintf-printf-and-sprintf
fprintf
writes formatted text to the output stream you specify.
printf
is equivalent to writing fprintf(stdout, ...)
and writes formatted text to wherever the standard output stream is currently pointing.
sprintf
writes formatted text to an array of char
, as opposed to a stream.