i'm using TURBO C compiler on a Windows System
o/p :Code:#include <stdio.h> main() { char *p1 = "New"; char *p2; p2 = (char *)malloc(20); while(*p2++ = *p1++) ; printf("\n%s",p2) }
Blank screen
From my understanding p2 is pointing to one position after '\0' character.
But why is the o/p appearing blank when it shud be a garbage value.
I tried it on two different pc's running TURBO C but still got the same result.
or is the blank character a garbage value..




Reply With Quote