There are many scenarios where you can see problems. But the key thing is, you did not allocate the memory correctly. The following code would produce Null pointer assignment error message after you run the program. Note: It will compile correctly.
The solution is you need to allocate memory the src pointer in main function char * src = malloc(100);
//Source Code Listing
void CopyMessage(char *p)