int main() { char *p; p = (char* ) malloc(sizeof(char) * 0); printf(\"Hello Enter the data without spaces :\\n\"); scanf(\"%s\",p); printf(\"The
In addition to Als comment - what happens: you write somewhere into memory and retrieve the data from there. So depending of your system and OS type you get a exception or just some undefined behaviour