//reverse char array in c
void reverse(char array[]){
int size = strlen(array); //include string.h to use strlen()
char rev[size];
for(int i=0; i<size; i++)
rev[size-1-i] = array[i];
for(int i=0; i<size; i++)
array[i] = rev[i];
}