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.
Not 8 in C
C fork (author gone)
it's a bit obvious that it should. of what use would be the table if it contained random values after calling the function ?
tells you that you have to initialize the table yourself
fixed
Another sad C kata that does not clarify whether the return string should be allocated...
Lua translation
these warnings were cleared at some point
You are currently mutating the input string when tests expect you to return a dynamically allocated string
done
info added
Merged.
you are mutating the input string and reusing it for the output. you cannot do that, it is a constant string (
const char *
). you need to allocate memory forstr
, and to nul-terminate it as well.Also, you cannot write your own
main()
function on Codewars, the tests already have one.C fork (author gone):
"free(): invalid pointer" error in C, if you want me to return solution on heap using *alloc functions, you should say so in the description.
oh yea, you're right. am not freeing the already_hit pointer. i should fix this. Thanks :)
Loading more items...