+ 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?

3rd Mar 2020, 6:10 AM
San Ket
San Ket - avatar
3 ответов
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.
3rd Mar 2020, 7:14 AM
Jayakrishna 🇮🇳
+ 1
What about you are taking? About your code calculations or at end return 0?
3rd Mar 2020, 6:57 AM
Jayakrishna 🇮🇳
0
About return 0
3rd Mar 2020, 6:58 AM
San Ket
San Ket - avatar