Ad
  • Custom User Avatar

    Please note the comment in the solution setup:

    // allocate a string on the heap, memory will be freed
    

    This means that your solution always has to return an allocated buffer which can bee freed by the tests. In some cases you return a value which cannot be freed.

  • Custom User Avatar

    I think this solution is flawed with two mistakes:

    • r and s are allocated with length x, which is strlen(z) and it does not include terminating NULL character,
    • s is not freed, resulting in memory leak.
  • Default User Avatar

    I keep getting error-
    Caught unexpected signal: SIGSEGV (11). Invalid memory access.

    Please help me understand this.

  • Default User Avatar

    I am not able to figure what the problem is,but my code shows error for random assertion number 4;
    please help I am a student,so I don't know much about the language yet;