
Implement gm_strdup, your own strdup, which allocates a fresh buffer on the heap and copies a string into it, byte by byte, including the null terminator.
gm_strdup("oh my zsh")Expected result
"oh my zsh"For your own tracking. Tests grade your code.
gm_strdup("")Expected result
""Expected files
strdup.cAllowed functions
mallocAllowed headers

v0.40: Create exercises. Challenge the community.
Meet Studio →Implement gm_strdup, your own strdup, which allocates a fresh buffer on the heap and copies a string into it, byte by byte, including the null terminator.
gm_strdup("oh my zsh")Expected result
"oh my zsh"For your own tracking. Tests grade your code.
gm_strdup("")Expected result
""Expected files
strdup.cAllowed functions
mallocAllowed headers

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.