[Solved] Can any one please help me what wrong with this code? [closed]
Ok, you dynamically allocate 10 bytes. Then you make the “name” variable (a char pointer) point to that dynamically allocated block. Then you make a char pointer which points to the same dynamically allocated block that “name” points to. Then you “free(name)” which deallocates the block that “tmp_name” also points to. “name” and “tmp_name” both … Read more