extern int strcmp_2(char *s1, char *s2)
{
while((*s1 == *s2)&& *s1!='\0' && *s1!='\0')
{
s1++;
s2++;
}
return (*s1 - *s2);
}
仿写strcmp函数
最新推荐文章于 2021-04-23 17:09:46 发布
extern int strcmp_2(char *s1, char *s2)
{
while((*s1 == *s2)&& *s1!='\0' && *s1!='\0')
{
s1++;
s2++;
}
return (*s1 - *s2);
}