strdup()
Syntax : char *strdup(const char *s);
This function returns a pointer to a null-terminated byte string, which is a duplicate of the string pointed to by s.
The memory obtained is done dynamically using malloc and hence it can be freed using free().