Regarding this program

sir this is a spiral print problem


sir I am getting a segmentation fault in this program

very small small mistakes
i have corrected them you can check modified code below

try to write code with proper indentation ,these mistakes will reduce

Modified Code

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.