please check the output …One element of the 1st coloumn is printed twice;
Here is the link https://ide.codingblocks.com/s/252118
saved in in the ide…
Spiral print 2d array
@Sitikant
See line no 10, i should start with start_col not i=0. So change line no 10 to for(int i=start_col;i<=end_col;i++)
Your code will work