well atleast one - used by dev c++ does not - and uses 0 as default value.
when tried :
int foo()
{
//whatever... - no return statement.
}
int main()
{
int b=5;
b=foo();
cout<<b<<endl;
}
no errors, and output is 0.
i know dev is not that good of an example but still..
this is just a result of some testing, i dont really have an answer i am sure of, so i'll just say i dont want anyone getting it wrong because of me.. these are just conclusions i made after trying the above code on a c++ compiler.
There is an exception for main() permitting omission of the return statement.
I found this at http://en.wikipedia.org/wiki/Main_function_%28programming%29
From this article:
In case a return value is not defined by the programmer, an implicit return 0; at the end of the main() function is inserted by the compiler; this behavior is required by the C++ standard.