#include <stdio.h>
2
3 char * mystrcpy(char *dst, const char *src)
4 {
5 char * pHead = dst;
6 while(*src != '\0')
7 {
8 *dst++ = *src++;
9 }
10
11 return pHead;
12 }
13
14 int main(int argc, const char *argv[])
15 {
16 char src[32] = "This is a hello.";
17 char dst[32] = {};
18
19 mystrcpy(dst, src);
20
21 printf("dst:%s\n", dst);
22
23
24 return 0;
25 }
01.c语言str函数库学习之strcpy
猜你喜欢
转载自blog.csdn.net/xiongjia516/article/details/79025215
今日推荐
周排行