0

Why we use return 0;?

8th Dec 2016, 2:53 AM
pritish ghalta
pritish ghalta - avatar
3 Answers
+ 4
the result of the function is 0. Sometimes it's used on main, because the function is defined "int main", so its mean that you have to return a numerical value. (else, It will say error). You can make the main void, and delete or comment the return statment-
8th Dec 2016, 2:56 AM
Nahuel
Nahuel - avatar
+ 2
listen to Nahuel he knows
8th Dec 2016, 4:11 AM
Joshua Hans
Joshua Hans - avatar
+ 1
you can change the code to int main(void)
8th Dec 2016, 3:54 AM
Shayne_Van