|
|
|
|
|
by jstanley
1725 days ago
|
|
strcmp,memcmp,etc. return 0 for equality, maybe you'd count that? But it's not really indicating "true", more "no difference". main() returns 0 for success, but I expect that is owed more to Unix. A lot of (e.g. Linux) system calls return 0 for success and an error value on error, but again that's more down to Unix than C. |
|
"0" is not a "truthy" exit code for a system call, it rather denotes the absence of an error.
In my view, a value X being "truthy" means that `bool(X)` evaluates to TRUE, or `if(X)` gets executed.