What is the purpose of the strdup() function in C?
strdup()
From strdup man:
The strdup() function shall return a pointer to a new string, which is a duplicate of the string pointed to by s1. The returned pointer can be passed to free(). A null pointer is returned if the new string cannot be created.
s1
free()