You're looking for the sprintf family of functions. Their general format is:
char output[80]; sprintf(output, "No record with name %s found\n", inputString);
However, sprintf by itself is extremely dangerous. It is prone to something called buffer overruns. What this means it that sprintf has no idea how big the output string you provide it is, so it will willingly write more data to it than is available. For example, this will compile cleanly, but will overwrite valid memory—and there is no way to let sprintf know that it's doing anything wrong:
char output[10]; sprintf(output, "%s", "This string is too long");
The solution is to use a function as snprintf, which takes a length parameter:
char output[10]; snprintf(output, sizeof output, "%s", "This string is too long, but will be truncated");
or, if you're on a Windows system, to use the _sntprintf variants and friends, which protect against overflowing of either the input or output strings.