int main(){
char a[80] = "Angus Declan R";
char b[80];
char *p,*q;
p = a;
q = b;
while(*p != '\0'){
*q++ = *p++;
}
*q = '\0';
printf("\n p:%s q:%s \n",p,q);
puts(p); //prints the string
puts(q); //doesnt print the string
return 0;
}
文字列が p から q にコピーされないのはなぜですか? qを印刷しようとすると、何も印刷されません