0
What's the difference between typing in return 0; or return 1; at the end of a program?
3 Antworten
0
Any other number than 0 signifies an error occurred.
0
If you return anything different from 0 (in int main) you are telling the program (e.g. the operating system) that is executing your program that something went wrong.
An error has occurred.
0
return 1 is used in recursive functions..