#include<stdio.h> char *mystrcpy(char *s1,char*s2) { char *p=s1; while(*s2!='\0') { *s1++=*s2++; } *s1='\0'; return p; } int main() { char a[20]="welcome to anyang"; char b[20]=""; printf("%s\n",mystrcpy(b,a)); return 0; }
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文:http://blog.csdn.net/u012701023/article/details/46757309