Ad
  • Custom User Avatar

    calloc doesinitialize your memory block with 0s, but malloc does not.
    So the problem may relate to that.

    Maybe you didn't put a null ending in the string array?
    I didn't do the exercise in c yet so I am not sure.

  • Custom User Avatar

    I just solved the kata in C and cannot see any special isue with it, so I am going to resolve this issue as not a kata problem.

    If you see some trash after the string returned by you, double check if your string is correctly null-terminated.