main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); } what is the output?
A part of uninitialized (and/or unowned) memory after (and including) the sixth byte of the malloc-ed memory will be printed out until reaching a NULL character in the memory somewhere!