Spiral Print Anti Clockwise

In this challenge whenever I try to tun my code, it gives the output of garbage values.But if I run my code in the online CB IDE, it gives me the correct answer.Why is it happening so??

https://ide.codingblocks.com/s/139689

@prashantverma.vn this is may because of main function in the main function you have taken array but you have not taken any input in it so this lead to give you a garbage value of you send your array after taking input it won’t give you the wrong result or not any garbage value.

I tried taking input from the main function but still there are garbage values in the output
What to do??

my doubt isn’t resolved yet, please help