Spiral Print Anti Clockwise

In this challenge, the output coming is filled with garbage values.Why is it so??https://ide.codingblocks.com/s/141427