+ 1
about main function
can someone describe me about main() function and why it return 0. please describe it detailly,
2 Respuestas
+ 3
execution of a program starts from main function
C++ main function has to return a value because it is declared as "int main" which is given as return 0 some compilers support "void main" then there is no need of return..
+ 2
main() function returns an integer value to allow the test of the execution. In case of error the program must return a error code (!=0) otherwise returns 0.