Segmentation Fault

I am getting an error in my code i.e segmentation fault.

hi @sonali2105
for Bottom Row by mistake you have write wrong conditon
correct one is
//Bottom Row
for(int i=endCol;i>=startCol;i–){

now it is running