sprintf. :
char output[80];
sprintf(output, "No record with name %s found\n", inputString);
sprintf . , . , sprintf , output, , , . , , — sprintf, - :
char output[10];
sprintf(output, "%s", "This string is too long");
snprintf, :
char output[10];
snprintf(output, sizeof output, "%s", "This string is too long, but will be truncated");
, Windows, _sntprintf, .