0

What is return 0

I didn't actually get this no proper answer. If the function is 1. Int main() only I use return 0 2. What return 0 actually print 3. What happen if not include return 0

3rd Dec 2021, 8:24 AM
Asharaf K
2 ответов
+ 3
1. correct 2. it doesn't print anything, it returns it. 3. not much, mabey some warnings, but it should be there, especially if using int main() [needs to return an int!] https://code.sololearn.com/cpGThocHw9cA/?ref=app
3rd Dec 2021, 10:29 AM
Slick
Slick - avatar
+ 2
If main function return 0 means no errors occurred during run time. Anything gone wrong it returns corresponding error codes. This way operation system can ensure some part of program executed successfully. Returned error codes used for debugging.
3rd Dec 2021, 2:00 PM
Azhagesanヾ(✿)
Azhagesanヾ(✿) - avatar