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.
Using calloc, the allocated space for the answer is set to zeros. The answer can't be more than 58 chars with the NULL terminator, so what gives?
This comment is hidden because it contains spoiler information about the solution
without seeing you code, I'm gonna take a wild guess you're forgetting the NULL terminator
Tath's exactly wath i'm doing! Thats the weird thing...
char * res = (char ) malloc (100sizeof(char));
There is something wrong on how i declare it? I'm using the same code on my IDE and runs propperly
you have to return a dynamically allocated string
I'm having a problem and don't know how to solve it. (i'm using C).
Test Crashed
Caught unexpected signal: SIGSEGV (11). Invalid memory access.
I don't know where to look for it, i suppose it's in the allocation of memory but not sure how to solve it. I try rewrote the code almost completely and i keep getting it. Any ideas?
I do, i have a particular return for that type of cases.
The first 2 test cases are successful, after that i got the error. Sorry, i should have said it before.
did you include the first test from the sample tests in your foreign environment? because one possibility is that you are trying to
access
theNULL
array on CW which has no validmemory
...I'm having a problem to solve this kata in C. I got the following error:
Test Crashed Caught unexpected signal: SIGSEGV (11). Invalid memory access.
I've never got it before and couldn't find any usefull information about it. I try the same code i use here on my own compiler and works perfectly, at least with the test cases shown.