
Write str_join, which returns one newly allocated string holding the n strings of parts separated by the byte sep.
str_join({"git", "log", "oneline"}, 3, '-')[git-log-oneline] parts=git|log|onelinestr_join(NULL, 0, '-')[]str_join({"", "b", ""}, 3, ',')[,b,] parts=|b|str_join({"one", "two", "three"}, 3, '\0')[one.two.three] parts=one|two|threestr_join.cmalloc<stdlib.h>declares malloc<stddef.h>defines size_t
Run the tests to grade your code
Write str_join, which returns one newly allocated string holding the n strings of parts separated by the byte sep.
str_join({"git", "log", "oneline"}, 3, '-')[git-log-oneline] parts=git|log|onelinestr_join(NULL, 0, '-')[]str_join({"", "b", ""}, 3, ',')[,b,] parts=|b|str_join({"one", "two", "three"}, 3, '\0')[one.two.three] parts=one|two|threestr_join.cmalloc<stdlib.h>declares malloc<stddef.h>defines size_t
Run the tests to grade your code
Memory will appear here