Meaning of Exit Code 11 in C?

You didn’t find a definitive answer because there isn’t one. It’s up to the author of the program to decide what exit codes they wish to use. Standard C only says that exit(0) or exit(EXIT_SUCCESS) indicate that the program is successful, and that exit(EXIT_FAILURE) indicates an error of some kind. (Returning a value from main is equivalent to calling exit with that value.) Most common …

Read more

What causes a SIGSEGV

Wikipedia has the answer, along with a number of other sources. A segfault basically means you did something bad with pointers. This is probably a segfault: Or this: Or maybe this: Same basic principle in each case – you’re doing something with memory that isn’t yours.