After seeing this question Swapping in a char * array[ ] leading to issues
User Claudiu gave a solution to swap the position of a string in an array
tmp = array[compare];
array[compare] = array[index];
array[index] = tmp;
However, i was wondering how to make that in a function by itself. using pointers, and I just can't understand the link between pointers and char arrays.