#include<stdio.h>
#include<string.h>
//将两个字符串合并为一个字符串并且输出
int main(void)
{
char str1[20] = {"Hello "};
char str2[20] = {"World "};
char *p1,*p2;
p1 = str1;
p2 = str2;
//指针p1遍历到str1的最后一个字符
while(*p1!='\0') // 注意是'\0'
p1++;
while(*p2!='\0')
{
*p1++ = *p2++; //已证明地址有改变
printf("%p ",p2);
}
printf("%s\n",str1);
return 0;
}