+ 1
why we use return 0; ??? what if we return 5;????
2 Answers
+ 4
Really you can return another value. But please, write about it in your program documentation and help. Because that returned value can be checked after ending the program in system. It is not automatic, but admin can added this check in some batch calling.
And the standard is, "returned 0 means program ended OK, another value - a program ended with any fault"...
So you can change it in your program, but write about it in your program documentation and help....
+ 2
it doesn't matter. it's true if you use return5;
as the main function supposed to return an integer, you have to use it.