Difference between fprintf, printf and sprintf?

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.


猜你喜欢

转载自blog.csdn.net/honk2012/article/details/80902613