String PRINT Format(ed). I.e. print to string using a given format. The various members of the printf family, derived from C where they first appeared (though they hark back to the olden days of BCPL’s writef call along that particular lineage), include: printf – print formatted (to standard output).
What sprintf () function actually does?
The sprint() function returns the formatted string.
Why is sprintf unsafe?
Warning: The sprintf function can be dangerous because it can potentially output more characters than can fit in the allocation size of the string s . Remember that the field width given in a conversion specification is only a minimum value. To avoid this problem, you can use snprintf or asprintf , described below.