Sorry for asking the already answered question, I am a newbie to C and don\'t understand the solutions. Here is my function
int rotateArr(int *arr) { int
You are not passing your 2D array correctly. This should work for you
int rotateArr(int *arr[])
or
int rotateArr(int **arr)
int rotateArr(int arr[][N])
Rather than returning the array pass the target array as argument. See John Bode's answer.