<p>What is the purpose of the <code>strdup()</code> function in C?</p>

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.