There are probably a lot of different ways to do this.

One way (probably non-optimal but it should work) would probably be to generate two random numbers and, since you say you're using an array, swap the elements at those two indexes.

To get a random number between 0 and an upper limit first get a random number, then you use the modulo operator on it with the right operand as the upper limit.

Make sure you seed the random number generator first with srand(time(0)).

Small example:

Code:

char array[10];
int rand1 = rand() % 10;
int rand2 = rand() % 10;
Swap( array[rand1], array[rand2] );

Then repeat.