sprintf formats converted values into a character array using the same formatting capabilities as printf and fprintf. It appends a terminating null character and returns the number of characters written before it, but accepts no destination-size limit. section 14.1
Formatting successive values
A formatter can advance through a buffer by adding sprintf's return value: p += sprintf(p, form, nums[i]);. Separators can then be copied after each formatted number.
Apply these safety rules:
- Provide a buffer known to be large enough; an insufficient buffer can overflow. section 14.1
- Use snprintf when the formatted output length is unknown; it limits writes and reports truncation through its return value. section 14.1

