一、strcpy
字符串拷贝函数:strcpy
eg: strcpy(a,"hello");//把hello拷贝到a字符串中
strcpy(a,b)//把b字符串拷贝到a字符串中
![](https://i-blog.csdnimg.cn/blog_migrate/e59b93e5717cf93309cce6e9bb6ca29b.png)
![](https://i-blog.csdnimg.cn/blog_migrate/0f43ec1921b9f60eb0e8b7afaa6aa237.png)
二、strcat
字符拼接函数: stycat(目的空间需要足够大放入拼接的字符串)
eg: stycat(a,"hello");//把hello拼接到a字符串后
如果a={"hi"};则拼接后为 hihello
![](https://i-blog.csdnimg.cn/blog_migrate/f242d73cd5e434383a2623143e12e860.png)
![](https://i-blog.csdnimg.cn/blog_migrate/3b7d0dfdff47aac0f691b17ba98110da.png)
三、strcmp
字符串比较函数: stycmp
eg: x=stycmp(a,b);
当x>0时,则a字符串大于b字符串;
当x<0时,则a字符串小于b字符串;
当x=0时,则a字符串等于b字符串;
![](https://i-blog.csdnimg.cn/blog_migrate/cd927fefa35c48ef2434434462cb6a6d.png)
![](https://i-blog.csdnimg.cn/blog_migrate/cbb6c8f590fb461eb2adb2ccf9836849.png)
四、strlen
获得字符串的长度
stylen(从字符串开头到\0中间字符的个数(不包含\0,包含空格))
eg: char a[]={"hello world"};
x=strlen(a);
![](https://i-blog.csdnimg.cn/blog_migrate/fa80271b5879bd3f89a180bcd2ed28e7.png)
![](https://i-blog.csdnimg.cn/blog_migrate/892a4b648c9346115bd6803b895e7e36.png)