C - Format char array like printf
sprintf - http://linux.die.net/man/3/sprintf
Use sprintf(char* out, const char* format, ... );
like so:
int main() {
char str[] = "Your Number:%d";
char str2[1000];
int number = 33;
sprintf(str2,str,number);
printf("%s\n",str2);
return 0;
}
Output:
---------- Capture Output ----------
> "c:\windows\system32\cmd.exe" /c c:\temp\temp.exe
Your Number:33
> Terminated with exit code 0.