1.字符串的拼接

1.sprintf() 往字符串的前面或中间、后面拼接一个字符串。
2.strncpy()用来复制字符串的前n个字符
-  //dest为目标数组,src为源数组,n为要复制的字符个数 
2.char* My_strncpy(char* dest, const char* src, int n)
3.char *strcat(char *_Destination,const char *_Source)
eg:char arr1[30] = "hello";
char arr2[] = "world";
strcat(arr1, arr2);
printf("%s\n", arr1);


![[天天向上] 学习方法论-事半功倍的问题解决方法](https://img-blog.csdnimg.cn/direct/a18944f9efc34c179904387d9aeb086a.png#pic_center)
















