An article here explains the differences which many of us have known for years. My assumptions have been:
sprintf
- First character "s" is for first argument of type string.
- Last character "f" is for format?
fprintf
- First character "f" is for first argument of type string.
- Last character "f" is for format?
printf
- starts with "" for no first argument.
- Last character "f" is for format?
I would think the first letter is for the first argument, but vsprintf
and printf
deny this claim. The last letter seems to mean it takes a format. Not to mention all the other uses of U's, N's, C's, V's and F's.
It would be amazing if someone could give explanation and source to the rational behind all these conventions in stdio
.
BONUS - Get additional respect for name dropping.