Core dumped error while compile and test

problem name: “chewbacca and number”

Question:

https://online.codingblocks.com/app/player/117244/content/109112/4713/code-challenge

My Code: https://ide.codingblocks.com/s/289135

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.

@dras_227 please share a screenshot of the error and input. It is working fine on the IDE

@dras_227 its giving wrong output for cases starting with 9. You cannot have any leading zeroes, so you cannot flip the digit if it will lead to a leading zero.
for eg output for 9545 should be 9444 but your output is 444

hey i modifid the code here https://ide.codingblocks.com/s/289135

but the problem isnt about failing the test cases…the code is not compiling itself

@dras_227 it is running fine for me, you have not provided custom input maybe this is why issue is coming. Try by giving input first

hey thanks …i never thought that… @Ishitagmabhir

1 Like

@dras_227 dont forget to mark it as resolved :slight_smile:

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.