0

if we use return 1; instead return 0; what happens?

11th Aug 2016, 5:05 PM
Padam Singh
2 Answers
+ 2
Nothing Much .. U Will See The Last Statement Of Your Output Screen As Process Returned 1 ...
12th Aug 2016, 7:15 AM
Shashank Pai
Shashank Pai - avatar
+ 1
nothing really, just a different number. the return 0 means that the program terminated properly since it reached the end return code. now if it exited prematurely, it would return a different number (usually ) so we can change it to be whatever we want our success code to be. the reason why we return something is because we declare int main. alternatively void main works too and has no return
11th Aug 2016, 6:44 PM
destro