1个回答
展开全部
char* strcpy(char* to, char* from)
{
char* p = to;
while(*to++ = *from++);
return p;
}
int strcmp(char* a, char* b)
{
while(*a == *b)
++a, ++b;
return *a - *b;
}
char* strcat(char* a, char* b)
{
char* p = a;
while(*a)++a;
while(*a++ = *b++);
return p;
}
int strlen(char* a)
{
int len = 0;
while(*a++)++len;
return len;
}
{
char* p = to;
while(*to++ = *from++);
return p;
}
int strcmp(char* a, char* b)
{
while(*a == *b)
++a, ++b;
return *a - *b;
}
char* strcat(char* a, char* b)
{
char* p = a;
while(*a)++a;
while(*a++ = *b++);
return p;
}
int strlen(char* a)
{
int len = 0;
while(*a++)++len;
return len;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询