0
What is return = 0; at the end of code?
Return = 0
3 Answers
+ 7
The main function is generally supposed to return a value and after it returns something it finishes execution.The return 0 means success and returning a non-zero number means failure. Thus we "return 0" at the end of main function. But you can run the main function without the return 0.It works the same .
Source: Stackoverflow
Happy coding!
+ 2
mesarthim is right.
Important: I suppose you mean âreturn 0;â and not âreturn = 0;â.
The equal sign normally is an assignment, but as âreturnâ is a reserved word it can possibly not be a variableâs name (which it would be in case of being placed before an equal sign).