3 ms·
Isn't there a more fundamental flaw in these questions? main() always returns an int, whether that's 4 or 8 bytes, 0 or 1 means success or failure depends on th
by chadcmulligan 7y ago
Isn't there a more fundamental flaw in these questions? main() always returns an int, whether that's 4 or 8 bytes, 0 or 1 means success or failure depends on the implementation. here's a bit of a discussion https://stackoverflow.com/questions/204476/what-should-main-return-in-c-and-c https://stackoverflow.com/questions/204476/what-should-main-...
Reminds me of the dumb exams some teachers would set to trick you when in school to make themselves feel superior.
- TazeTSchnitzel 7y agoWhat's wrong with it returning int here? They aren't using any variables bigger int, and the meaning of return codes is irrelevant.
- saagarjha 7y agoOmitting the return type for main is legal in C89.