#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好用
centos中c环境字符串拼接
最新推荐文章于 2024-07-24 22:01:24 发布