I haven't seen the why addressed well in any of the answers so far. In C, it's perfectly legal for a function with a non-void return type to end without a return statement/value, as long as the caller does not attempt to use the return value. For instance (slightly nontrivial example):
#include
int foo(int want_result)
{
puts("hello");
if (want_result) return 42;
}
int main()
{
foo(0);
printf("%d\n", foo(1));
}
This example is somewhat contrived, but it could actually become meaningful if the return type is a huge structure that would take non-trivial time to return.