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.
This comment is hidden because it contains spoiler information about the solution
It's undefined behavior, at least. It probably causes a segmentation fault and crashes. At worst, it will seem to work but will corrupt some other data when you write to such an index.
You can find out if you either "Train Again" or hit "Fork" and change the tests to use any higher number within the array. I just tried it and it died with
Which other confused person is running around putting Spoiler flags on boilerplate and C programming discussion?
int num[MAX_INT] = {0};
doesn't fit into the stack.You could do
int *num = malloc(MAX_INT)
but you might get fired. I would fire you.edit: it's INT_MAX, actually. I forgot :P
This comment is hidden because it contains spoiler information about the solution
then it stops passing tests, so you put in a bigger number until it passes again, or you just do the same as with
*ret
, but I apparently didn't feel like it.p.s. user8071091 is the old account I deleted