Spiral print of 2d array

i dont underatand the error,please rectify and tell me a few ways of passing a 2d array in a function

https://ide.codingblocks.com/s/37386

https://hack.codingblocks.com/contests/c/512/440

There is compilation error in your code… you aren’t passing the 2D array in the function correctly.

please tell me how to correctly pass it
i mean 2 or 3 ways

You have declared your array as arr[m][n] . Instead try declaring it as arr[100][100] or using some other constant values . It works.