what would be the possible reason for run time error?
https://ide.codingblocks.com/s/54651
Spiral print 2-d
Hey Rahul, check the last 2 for loops in your code, terminating condition of for loop is incorrect which results in infinite for loop so update the last 2 for loops like this line:18 for(int j=endcol;j>=scol;j--)
and line:21 for(int i=endrow;i>=srow;i--)
.