I'm new to C programming, and I was trying a function to swap the variables of an array, but I just cannot get it to work, and I don't know why. Can you please help me? Thank you in advance.

Here's the code:

```
#include <stdio.h>

void inplace_swap(int *x, int *y){
    if (x!=y){
        *y = *x ^ *y; 
        *x = *x ^ *y; 
        *y = *x ^ *y; 
    }
}

void reverse_array(int a[], int cnt){
    int first, last;
    for (first = 0, last = cnt-1; first <= last; first++, last--)
        inplace_swap(&a[first], &a[last]);
}

int main(){
    //int eight = 80, seven = 70;
    //inplace_swap(&eight, &seven);
    //printf("New eight value is %d\n", eight);
    //printf("New seven value is %d\n", seven); 

    int arr[5] = {1,2,3};
    reverse_array(&arr[3], 2);
    printf("%d\n", arr[1]);
    //int i;
    //for (i=0;i < 4;i++) {
    //  printf("%d\n", arr[i]);
    //}
}

```