
Repair build_path so it still returns the joined path and stops leaking the block it borrowed on the way.
build_path("/usr/local", "bin")Expected result
[/usr/local/bin]For your own tracking. Tests grade your code.
build_path("/tmp/", "core.log")Expected result
[/tmp/core.log]build_path("", "Makefile")Expected result
[Makefile]build_path("/etc", "")Expected result
[/etc/]build_path(NULL, "bin")Expected result
nullExpected files
read_the_leak.cAllowed functions
mallocfreeAllowed headers

Repair build_path so it still returns the joined path and stops leaking the block it borrowed on the way.
build_path("/usr/local", "bin")Expected result
[/usr/local/bin]For your own tracking. Tests grade your code.
build_path("/tmp/", "core.log")Expected result
[/tmp/core.log]build_path("", "Makefile")Expected result
[Makefile]build_path("/etc", "")Expected result
[/etc/]build_path(NULL, "bin")Expected result
nullExpected files
read_the_leak.cAllowed functions
mallocfreeAllowed headers

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.
v0.40: Create exercises. Challenge the community.
Meet Studio →