A non-zero value (usually of 1) signals abnormal termination. Is it true for any larger programs? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

A non-zero value (usually of 1) signals abnormal termination. Is it true for any larger programs?

As I tried {return 99} instead of {return 0} in some basic programs, I got the o/p as same as using {return 0}

28th Jan 2017, 5:05 PM
Aravind K
Aravind K - avatar
1 Answer
0
return 0 means interrupt the program without any problem but if you use the -1 you should see an error in the compiler.
30th Jan 2017, 5:40 PM
Oussama Jaaouani
Oussama Jaaouani - avatar