You don't need to pass a pointer to an array to in-place change its elements. For instance, the following code swaps the first with the last item of the 2x2 array:
#include <stdio.h>
void myswap( int a[][2], int x1, int y1, int x2, int y2)
{
int temp = a[x1][y1];
a[x1][y1] = a[x2][y2];
a[x2][y2]= temp;
}
void dump(int a[][2], int n)
{
int i, j;
for (i=0; i<n; ++i)
{
for (j=0; j<2; ++j)
printf("%d ", a[i][j]);
printf("\n");
}
}
int main (void)
{
int arr[2][2];
int i,j;
printf("Enter the array ");
for (i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
scanf("%d",&arr[i][j]);
}
}
dump(arr, 2);
myswap(arr, 0, 0, 1, 1);
dump(arr, 2);
return 0;
}