0
What is return = 0; at the end of code?
Return = 0
3 odpowiedzi
+ 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).