Why return 0 from main() in a C program?
c, c++
Solution
It returns the 0 to OS to tell the OS that your program executed successfully.
Problem
When writing a C/C++ program, specifically with latest compilers, why do we need to return an integer from the main() method? Like int main() and we return "return 0" from it. So what is the exact reason behind this?