Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
you do not allocate enough memory.
count
is the length of the input array, i.e. the number of strings. your string will always require more memory than that, for example if you join"ab"
and"def"
you need 2 ("ab") + 1 (space) + 3 ("def") + 1 (nul terminator) = 7 bytes. you need to calculate the correct buffer size before allocating memory.Did you test your solution on your machine with an array which has only one element?
Did you test your solution on your machine with
NULL
?