1 #include <stdio.h> 2 int main(int argc, const char *argv[]) 3 { 4 char a[45]="hello word"; 5 char b[45]="xjwkkk"; 6 char *p1=a; 7 char *p2=b; 8 while(*p2) 9 { 10 *p1=*p2; 11 p1++; 12 p2++; 13 } 14 printf("%s\n%s\n",a,b); 15 16 return 0; 17 }
标签:p2,功能,p1,int,45,char,++,strcpy,指针 From: https://www.cnblogs.com/xj123/p/17132935.html