//Example coding

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

void main()
{
char grid[9]={'a','a','b','b','c','c','d','d'};
int high=7;
int random,random2;
int low=0;
int temp;

srand(time(NULL));//once per program


random=rand()%(high-low+1)+low;
random2=rand()%(high-low+1)+low;

temp=grid[random];			//swap the elements
grid[random]=grid[random2];
grid[random2]=temp;

printf("%s",grid);


}  