I’m newly using CODE::BLOCKS+mingw compiler
If I don’t type return 0 at the end of program,I can see that main() is returning some integer,I learnt that main() returning 0 infers program executes successfully.I don’t find any flaw in my code, why is it returning some integer?
secondly
any function returns its value to its function call, to where does main() return its value?
The C++ Standard says that if you don’t explicitly return a value, the compiler must generate code as if you had typed:
Exactly what the return value means and how it is returned is implementation specific. For most OSs, the return value becomes the exit code of the process.