From the C Standard (5.1.2.2.3 Program termination)
1 If the return type of the main function is a type compatible with
int, a return from the initial call to the main function is equivalent
to calling the exit function with the value returned by the main
function as its argument;11) reaching the } that terminates the main
function returns a value of 0. If the return type is not compatible
with int, the termination status returned to the host environment is
unspecified.
So this program
#include <stdio.h>
int main()
{
// my first program
printf("Hello, World\n");
}
in fact is equivalent to
#include <stdio.h>
int main()
{
// my first program
printf("Hello, World\n");
return 0;
}
This rule is valid only for the function main.
Otherwise if a function has a return type other than void
its return statement shall return a value convertible to the return type.