>>11114799they both exit the program, but the difference is the exit code (in C/C++ it would be the return value of the main function). the shell knows about the exit code -- in bash you can print out the exit code of a command by doing
echo $?
right after running the command.
usually an exit code of 0 means successful execution and other exit codes mean some sort of issue. 1 typically means "bad" and is the catchall for all failures, but sometimes programs use a whole bunch of different exit codes to indicate different failure modes, but 0 is "good". that's a convention and some programs break it