Ad
  • Custom User Avatar

    please blame your own code before you blame the tests (there have been more than 3,000 completions in C as you can see at the top of the page, so such a glaring mistake is unlikely). debug your code locally. if you don't know what input causes your code to crash, add a

    printf("input was %d\n", n);
    fflush(stdout);
    

    at the beginning of your function (flushing the standard output stream will ensure that you will see it even if the program crashes). i tried your code in a debugger and you do not allocate enough memory in inst->num_array. you allocate enough space for 5 integers, while a 32-bit integer can have as many as 10 digits.