You will be writing your own version of strcpy.
Write a function named strdup that uses dynamic storage allocation (i.e. malloc) to create a copy of a string. For example, the call
p = strdup(str);
would allocate space for a string of the same length as str, copy the contents of str into the new string, and return a pointer to it.
Have strdup return a null pointer if the memory allocation fails.
Your main function should call strdup by passing in a string that it receives from the command-line and print out the result returned from strdup.
Hand in your source code and output.