+ 1

As people said that if return return any other value not 0 that means it's an error. Checkout this code it knew my error.

https://code.sololearn.com/c5lsospbfEWs/?ref=app

28th Jun 2019, 12:13 PM
The unknown 321
The unknown 321 - avatar
5 Answers
+ 1
The unknown 321 First thing the statement is applicable to a running program. Your code does not even compile ! What do you expect from a compiler to not even tell you the syntax errors in your code? What do you mean by this ?
28th Jun 2019, 12:36 PM
The unknown 321
The unknown 321 - avatar
+ 1
The second thing you said about the non zero return is an indication of failure for system. I already know this. Can you explain the return logically with some examples please ?
28th Jun 2019, 2:08 PM
The unknown 321
The unknown 321 - avatar
+ 1
Check out the code that I wrote. If you did then what I need to know is when should I use return statement ?. Because some people use differently like in calculation
29th Jun 2019, 1:56 AM
The unknown 321
The unknown 321 - avatar