+ 3
why do we need to put return 0;
because i think that the program will run without return 0; am i right?
4 Answers
+ 9
I think it might run without returning 0 but sometimes you want to know from outside the program that it ran without any errors. I have seen cases where a non-zero error code is sometimes returned by a program to the operating system to indicate that there was an error during operation. return 0 usually means that the program ran without errors.
+ 4
Ok thank you guiz
+ 4
It is OK to omit the return statement for main() in C++.
http://www.stroustrup.com/bs_faq2.html#void-main
+ 2
Newbie please go through below link:
https://www.sololearn.com/Discuss/1463889/?ref=app