Actually, sprintf() doesn't really make any string (it doesn't allocate
any memory itself), but it assumes your string is as long as it needs
to be for the operation. sprintf() has no safety stops to catch the
case where the memory you gave it (in which to write the formatted
string, arg 1) is reaching its end. The memory used by both sprintf()
and snprintf() is the memory you have allocated before calling it.
snprintf() will just stop after n (arg 2) characters, usually the
length of your string - 1.
-- Shaw Terwilliger