Introduction
Return codes help a program tell if a task worked or if there was a problem. They are simple numbers that show success or failure.
When a function needs to say if it finished its job correctly.
When you want to check if a file opened successfully.
When you want to know if a calculation or operation gave a valid result.
When you want to stop a program early if something goes wrong.
When you want to communicate status between different parts of a program.