https://ide.codingblocks.com/s/33932
it is giving output if i use or operator, but thats wrong ans.
You need to add one more base case
if(endrow<0 || endcol<0){ return; }
I’ve made correction in your code https://ide.codingblocks.com/s/33973