int main(){
char strA[50] = "Hello";
char strB[50];
char *pA;
char *pB;
puts(strA);
pA = strA;
puts(pA);
printf("\n");
pB = strB;
while(*pA != '\0')
*pB++ = *pA++;
*pB = '\0';
puts(pB);
puts(strB);
return 0;
}
输出如下:
Hello
Hello
(空行)
(空行) <--为什么这一行会是空白?pB指向strB了为什么不是Hello呢?
Hello