strcat:
<span style="font-size:18px;">#include<stdio.h> #include<assert.h> char * my_strcat(char *str1,char const *str2) { char* tmp=str1; assert(str1); assert(str2); while(*str1!='\0') { str1++; } while(*str1=='\0') { *str1++ = *str2++; } return tmp; } int main() { char p[10]="abbc"; char *q="defg"; printf("%s\n",my_strcat(p,q)); return 0; } </span>
原文地址:http://blog.csdn.net/liuxiaoqian_/article/details/45890307