0
why is return 0 is used at the end of c program ?
3 ответов
+ 13
It is the Exit status of the program..
since the return type of main function is int it requires an integer value as return...
most os consider 0 as no error & non-zero as error in program...
& it is also there in C++ standard so I guess u should write it even if it is not mandatory...
+ 3
It’s an agreement. Program return 0 at the end if no errors occurred and 1 if opposite
+ 1
is it mandatory to use every time ?