Before this question even I thought these statements were true.
Specific to C as it doesn't support throwing exceptions programmers used the return
as a way for your routine to send some information to the parent routine that called it which is considered to be an exit status.
There was something of a convention that 0 meant success, a positive number meant minor problems, and a negative number meant some sort of failure.
Actuallly, after digging into a lot of manuals and C documentation I found this : (here's the link, look at line 54 and 55)
In stdlib.h
the macros EXIT_SUCCESS
and EXIT_FAILURE
are defined like this :
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
These 2 macros can be used as the argument to the exit function declared in stdlib.h and they can also be used as the return value of the main function.
Thank you for the question.
sudoankit.