strcmp函数实现
//字符串比较函数
#include<stdio.h>
int my_copy(char* arr1, char* arr2);
int main(void)
{
char arr1[] = "aaasdf";
char arr2[] = "adsasd";
int ret = my_copy(arr1, arr2);
printf("%d\n", ret);
return 0;
}
int my_copy(char* arr1, char* arr2)
{
while (*arr1++ == *arr2++)
{
;
}
if (*arr1 > *arr2)
return 1;
else
return 0;
}