moveToEnd: Put the value that was thus eliminated into the last position of the array
int moveToEnd(string a[], int n, int pos);
Eliminate the value at position pos
by copying all elements after it one place to the left. Put the value that was thus eliminated into the last position of the array that the function knows about. Return the original position of the item that was moved to the end. Here's an example:
string people[5] = { "juliet", "sierra", "sierra", "echo", "november" };
int r = moveToEnd(people, 4, 1); // returns 1
// people now…