2 ms·
strlen(null) is pretty straightforward, although being a pure function the compiler might rearrange things. if (!s) puts("hi"); strlen(s); I don't thi
by tedunangst 8y ago
strlen(null) is pretty straightforward, although being a pure function the compiler might rearrange things.
if (!s) puts("hi");
strlen(s);
I don't think that's guaranteed to print hi if s is null.
More fun is memset(0,0,0) which is technically verboten.