+ 2

Ending of function

Why do certain functions need a return 0; At the end and other do not?

10th Apr 2017, 4:10 PM
Bob Joe
2 Answers
+ 13
It's recommended to add return 0; to the end of the main method. https://www.sololearn.com/discuss/259277/?ref=app https://www.sololearn.com/discuss/200512/?ref=app
10th Apr 2017, 4:16 PM
Jafca
Jafca - avatar
+ 11
Function return values depends on their return type. Void functions, for example require no return value (void). Integer functions return integer value, boolean functions return boolean values, etc.
10th Apr 2017, 11:39 PM
Hatsy Rei
Hatsy Rei - avatar