+ 2
Return 0
If you begin with " int main" does the compiler automatically fill in " return 0" at the end? I know it works on sololearn but does it work when you are creating actual programs from scratch?
2 Answers
+ 7
Yep `return 0` is automatically returned for you if you don't do it. That only works for the main function though.
+ 5
I don't believe so but maybe this is compiler dependent. E.g. on code playground it seems to work without return.
https://code.sololearn.com/c77G1t0jI80D/?ref=app