+ 1
Return 0
The answer to this is 45 but in the code its return 0 So why would code run to give a number i.e 45 when it is to be returned 0?
3 Answers
0
That return 0 is returned to operating system. Not to console output. Program outputs displayed on console output. Returned statements returned to calling functions.
OS expects a value from Program to determine program status.
Generally return 0 means Program successfully executed and otherthan zero means Program exited with errors...
Hoping this helps you.
+ 1
What about you are taking? About your code calculations or at end return 0?
0
About return 0