C/C++ Arena

Step 4 of 9

calloc and strdup-style copies

Your turn: write char *copy_string(const char *s) that returns a new heap copy of s.

Previous: Return heap memory from a function Next: Growing with realloc