字符函数和字符串函数
5.strcat的使用和模拟实现
头文件:string.h
strcat函数又被称为字符串追加函数 ,功能就是在一个字符串后面追加一个字符串
char * strcat ( char * destination , const char * source )
//源字符串必须以"\0"结尾,目标字符串也必须以"\0"为结尾
//目标字符串空间也要足够大,足以容纳源字符串的内容
//目标空间必须可修改
//尽量不要自己给自己追加,不保障自己给自己追加

图一
++图一是strcat函数运用的例子演示++
++下面的图二会演示strcat函数的模拟实现++

图二
6.strcmp的使用和模拟实现
用来比较字符串(比较对应位置的字符)
int strcmp (const char * str1, const char * str2);
//返回值是int类型,有三种,分别是<0,0,>0
//str1>str2 int>0 后面以此类推
++图三是strcmp的使用例子++

图三
++图四是strcmp的模拟实现++

图四