Why my code is giving segmentation fault?

I was solving the funky chess problem, I’m getting. segmentation fault.

Here’s the link to my code: https://ide.codingblocks.com/s/299066

Plz help me find out the reason for segmentation fault & also, what does segmentation fault mean

Segmentation fault means that you are either stuck in infinte loop or you are trying to access some out of memory index.
Here I see that you are trying to go inside loop only when the following conditions satisfy.
I am providing you a code where the conditions are properly used to go inside the function.

I understood your logic.
You are going inside only if the conditions are satisfied. I’m not able to understand the error in my code. Could you plz elaborate how my code is accessing out of access memory,as I’m going inside only if it is not going outside.

I think your code is going inside infinite loop. Try using a visited array for each place otherwise you will get roam around everywhere.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.