Ad
  • Custom User Avatar
    • Be careful with strncpy(), it is a terrible function. It does not nul-terminate dest if there is no nul byte among the first n bytes of src. As a result ordered is not nul-terminated in your code
    • your code does not work for e.g. "1 4 3 2 5"