摘要:
1、函数原型 #include <stdio.h> int strcmp(const char *s1, const char *s2) { while(*s1 == *s2) { if(*s2 == '\0') return 0; s1++; s2++; } return (unsigned ch 阅读全文
posted @ 2021-06-03 10:45
小鲨鱼2018
阅读(1662)
评论(0)
推荐(0)
摘要:
1、函数原型 #include <stdio.h> char *strncat(char *s1, const char *s2, size_t n) { char *tmp = s1; while(*s1) s1++; while(n--) { if(!(*s1++ = *s2++)) break 阅读全文
posted @ 2021-06-03 10:04
小鲨鱼2018
阅读(225)
评论(0)
推荐(0)
摘要:
1、函数原型 #include <stdio.h> char *strcat(char *s1, const char *s2) { char *tmp = s1; while(*s1) s1++; while(*s1++ = *s2++) ; return tmp; } int main(void 阅读全文
posted @ 2021-06-03 09:49
小鲨鱼2018
阅读(1348)
评论(0)
推荐(0)