void fun() { char buf1[256]; char buf2[256]; char* p1 = buf1; char* p2 = buf2; printf("input string 1\n"); scanf("%s", buf1); while((*p2++=*p1++)!='\0'); printf("buf2 = %s\n", buf2); }