Spiral print run error

CANT FIGURE OUT WHY RUN TIME ERROR POP UPS
HELP ME OUT ’
SOURCE CODE-https://ide.codingblocks.com/s/164138

@Vivek-Pandey-2129725577345937 hey vivek increase the size of the 2d array.


still not working size was never the problem i am taking 4x4 matrix atleast it should print that i dont understand why runtime error pops up

@Vivek-Pandey-2129725577345937 hey vivek your last two loop is wrong please check it once you will get your doubt clear.