3 ms·
I feel dumb :-/ ... Could you explain why it's funnier if you know UNIX?
by Alterlife 10y ago
I feel dumb :-/ ... Could you explain why it's funnier if you know UNIX?
- geofft 10y agoThe convention is for UNIX processes to return 0 on success and a non-zero value (often 1) on failure. This means that the UNIX shell "if" statement tests to see if the return value of the program it runs is zero. Therefore, the UNIX "true" command is int main() {return 0;} and the "false" command is int main() {return 1;} -- despite the C convention being the exact opposite.