main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); } what is the output?
ANS: NULL It is a bit tricky question. If u observe carefully then we are incrementing the pointers p1,p2. When it reached the end of the string, *p2 points to NULL. We have lost the address of the starting position.