Each %s in the string means there should be another parameter that is a pointer to a string. The line should look like:
Care to elaborate?
I purposely stayed away from C's formatted output for the brief time I was learning C++.
sprintf(str, "%s %s %s", a, b, c);Because the function is expecting another parameter on the stack to go with the third %s, it will use whatever is in the next memory location after the b. This could be anything!