Possible Duplicate:
Function returns value without return statement
what is the return value of the function that returns int, but isn't returning anything explicitly.
For instance output of
int fun() { printf("\ncrap"); } void main() { printf("\n return value of fun %d", fun()); } The output I am getting is :
crap return value of fun 1 Does this depend on compiler I am using ?
Thanks !!!