Creates a duplicate of a string and returns a pointer to the new copy.
#include <string.h> char *strdup ( const char *src);
(IN) Points to the string to be copied.
If successful, returns a pointer to the new copy of the string; otherwise, returns a NULL pointer and sets errno to the following:
The memory for the new string is obtained by using the malloc function and can be freed using the free function.