Good idea. "sprintf (y, "%s%d", y, x);" will definitely work the same as "sprintf (y + strlen (y), "%d",x);". Since sprintf is set up to concatenate, it'll handle the '\0' just fine.