Segmentation fault

I am getting error -> /bin/run.sh: line 4: 18 Segmentation fault (core dumped) ./exe
my code -> https://ide.codingblocks.com/s/654659
Its running fine on codeblocks.