Comment Comment by BananaaRepublik By the way, I realized that sprintf can be used to concatenate by using the buffer within the formatting itself, while snprintf prevents it. Is it a safety issue too? strcpy(buf, "foo"); sprintf(buf, "%s%s", buf, "bar"); //buf contains "foobar" strcpy(buf, "foo"); snprintf(buf, sizeof buf, "%s%s", buf, "bar"); //buf contains "bar" parent BananaaRepublik 3 years ago