#include <stdio.h> #include <string.h> int main () { char str[80]; strcpy (str,"these "); strcat (str,"strings "); strcat (str,"are "); strcat (str,"concatenated."); puts (str); return0; } //以上是字符串拼接的例子,总体来说还是没有sprintf好用原文链接:https://www.f2er.com/centos/377640.html