CS136 Lecture Notes - Lecture 1: Infinite Loop, C Dynamic Memory Allocation
Document Summary
This is not an error code, the one exception among all other codes you might encounter. If a program returns this code, then your program has not crashed and successfully completed (ie. reached the end of main). This is a general error code that programs can return to indicate that something went wrong, but not as an indication of what specifically went wrong. This error code shouldn"t happen, unless you return 1 from main, or call exit(1) at any point in your program. If you obtain this error (and don"t satisfy the conditions above), reload seashell and try running your code again. Some error occurred when the computer attempted some form of arithmetic operation. This is likely caused by: division by zero. Such an error is caused by some form of invalid memory access. This could be to access memory that the program does not have access to, or can also be caused by running out of memory.