c programming append to string code example Example: c str add int char buf[12]; snprintf(buf, 12, "FPS: %d", framesCount);