printf outputs to the standard output stream (stdout)
printf
stdout
fprintf goes to a file handle (FILE*)
fprintf
FILE*
sprintf goes to a buffer you allocated. (char*)
sprintf
char*