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.
I may be a
2kyu
in C, but I feel this is generally an unreliable indicator of the depth of awareness of a coder to any partiucular language. Also, I'm100%
self-taught in coding, so I am constantly filling in various gaps. So, thank you for the affirmation of my supposition.You are correct; this prompts a warning:
format specifies type 'int' but the argument has type 'size_t'
.Hence the warning
unsequenced modification and access to 'n'
, about which I wonder there is a risk of U.B.Is it because there's no guarantee that one side or the other side of the assignment may be evaluated first?
the tests
free()
the returned pointer, so the program would crash if you returned an automatic arrayI scrolled through some solutions and I can see only ones allocating memory dynamically. What example solution would you think would fail?