Ad
  • Custom User Avatar

    Sorry but this code is all bad. First of all, you are not checking if the input string contains character lesser than 'a', which can easily happen if the string would be corrupted. Then, you are making malloc to int* type-pointer, and whats actually worst, you are mallocing only 5 bytes, in case of longer inputs, 5 bytes are not enough to hold errors + slash + string len, so you will actually write final string without NULL termination.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution