sortData returns nothing. It sorts the data. The other functions return the index array pointer.

When you look up a function in the manual, you can see if and what it returns after the function parameters. *int means it returns an int array.