Exit status
- When a program ends, a special exit code is provided to the computer.
main
function returns an int
- technically programs can also secretly return numbers to signal methodically whether the program was successful or not
- status code 0 →program exits without error
- status code 1 →when an error occurs that results in the program ending
echo $?
- shows the exit status of the most recent command
Declaration vs Definition
- function declaration
return type, name, arguments.;
- function definition
- actual implementation of the function