My function prototype is
int** rotate(int **arr, int row, int col, int fl);
where arr
is the two dimensional array, row<
From the example, I assume that you are using a static definition of arr
.
The Pointer to pointer is not the same as a 2D array.
Change
int** rotate(int **arr, int row, int col, int fl);
to
int** rotate(int arr[][20], int row, int col, int fl);
Note that the no of columns will have to be defined before compilation.