+ 5

What happen if we se return 1; in place of return 0;

C++

16th May 2019, 4:43 PM
SK@123
SK@123 - avatar
2 Answers
+ 9
returnĀ n; from your main entry function will terminate your process and report to the parent process (theĀ oneĀ that executed your process) the result of your process. 0Ā meansĀ SUCCESS. ...returningĀ different values likeĀ return 1orĀ returnĀ -1 meansĀ that program is returningĀ error
16th May 2019, 5:04 PM
Why So Serious ?
Why So Serious ? - avatar
+ 6
0 means the program executed without any problems. If you put 1, it means there was an error. It doesn't matter unless another program runs your program and wants to know if it executed correctly.
16th May 2019, 4:51 PM
inxanedev!
inxanedev! - avatar