+ 6
Simple definition or explanation of "return 0;"?...didn't get it clearly!
Can anybody please tell me about the return 0; part of the code.
3 Réponses
+ 4
Ok. In main function the return 0 serves as a signal to you know your program exited correctely.
Because people implemented that
0 equals exit success
Anything that is not 0 ( generally we use 1) equals exit failure.
But if i not use what happens?
Here the answer:
https://www.sololearn.com/discuss/1555239/?ref=app
In an informal way you are saiyng your programs end here and if return 0 executes you are giving a signal that your program worked perfectly.
+ 2
so, “return 0;” Means Your Program Has Exceeted properly,
Then “return 1;” means that Your Program Has Not Exceeted Properly.
+ 1
return 0 is simply the successful ending of a program, any other returned value means there is a prblm.