Ad
  • Custom User Avatar

    that remains seperately as a different problem with your code because it doesn't handle every case properly

  • Custom User Avatar

    In your code, you attempt to allocate memory for the provided char *IPv4 within the function, but it has already been pre-allocated prior to being passed to the function.

  • Custom User Avatar

    you must write to the parameter phnum and return it, instead of allocating a string on the heap

    I added a note in the initial code

  • Custom User Avatar

    output = testing; - it is not how output arguments work in C.
    Your solution is not entirely correct, it's not a kata issue.