Error after running code?

What does error means during run code?

There might be a segmentation fault. (accessing invalid array index or maybe infinite loops or never ending program)
Take a very small example and dry run the code on pen and paper to remove them.
Comment out different parts of your code to see if it affects or not…