+ 1

what if at the end of the program I write return 1; instead of return 0; what would happen to my program after compilation

30th Mar 2017, 9:27 AM
Timothy Achibu
Timothy Achibu - avatar
3 ответов
+ 1
returning a 1 instead of 0 from the main will have no impact on your program. but if your program is used by another one, receiving a one as return code will make it assume that something went wrong and who knows the consequences of such a bad assumption. ..
30th Mar 2017, 10:57 AM
Raymond
Raymond - avatar
0
it will return 1
13th Apr 2017, 8:48 AM
kimanzi
kimanzi - avatar
- 1
Try out. You will never know what will happen and how program works if you are not trying and doing mystakes. Of corse some of them is better to not be tryed but things like this... You can play with it ;)
30th Mar 2017, 9:34 AM
Ivan Kerepčić
Ivan Kerepčić - avatar