+ 5
Even without using return 0 I was getting the right output so what is it's use then?
2 ответов
+ 5
compiler adds it automatically during compilation (underneath), but there are compilers which will fail. So, it is good practice too have it always.
+ 3
If you omit it, it is added by default.
It is an error message for the program which will use yours (generally your OS) to know if everything went right.