Must the int main() function return a value in all compilers? [duplicate]

In C++, and in C99 and C11, it is a special rule of the language that if the control flow reaches the end of the main function, then the function impliclty returns 0.

Leave a Comment