+ 2
Why return 0 doesn't affect output?
3 Respostas
+ 27
//where is the code, language ?
https://www.sololearn.com/Discuss/333866/?ref=app
+ 5
Simply because it is the last statement of a program.
What does return actually do?
it brings you out of the whole block of the function regardless of the position it is placed at...which is already going to happen since you have finished your code and all of its logics.
So return 0 doesn't affect much.
+ 1
in the context of c or c++ if you miss return statement in main then compiler will add it for you.