/bin/run.sh: line 4: 18 Bus error (core dumped) ./exe

Question: https://online.codingblocks.com/app/player/117407/content/97720/4825/code-challenge
My Code: https://ide.codingblocks.com/s/249212

This code which works fine on CodingBlocks IDE gives this error /bin/run.sh: line 4: 18 Bus error (core dumped) ./exe

Please explain this error and what does it signify.

I thought my solution is bug free.
It fails to work for array of different sizes. Hence Segmentation Fault.