+ 2

Please am still not familiar with the (return 0)at the end of the function

C++

1st Oct 2019, 10:06 PM
Enoch Djan
Enoch Djan - avatar
4 Answers
+ 2
Return in main() is considered exit status of a program. When main() return 0, It means that it executed successfully. It will return other values when something is wrong.
1st Oct 2019, 10:37 PM
äœ çŸ„é“èŠć‰‡ïŒŒæˆ‘äčŸæ˜Ż
äœ çŸ„é“èŠć‰‡ïŒŒæˆ‘äčŸæ˜Ż - avatar
+ 2
Returns a value of zero and program control back to the point of invocation of the function.
2nd Oct 2019, 4:15 AM
Sonic
Sonic - avatar
0
To show the main function has successfully executed......
11th Oct 2019, 5:40 PM
Gershon Elikem Normenyo
Gershon Elikem Normenyo - avatar
0
of course... it terminates the program if successful
12th Oct 2019, 8:24 PM
Kponyo John Djama Kofi
Kponyo John Djama Kofi - avatar