I've made a program that has exit codes of 1, 2 etc. in places where an error is encountered. Is there anyway I can find out the return code or exit code when a program ends? Would this help me find out where exactly the program terminated, and help me fix the problem?
What is the approach generally used by programmers? Is the exit() function used to diagnose where the program has quit?




Bookmarks