4 ms·
The C version has a buffer overflow if more than 1024 consecutive alphanumeric characters are input. And a much less serious point, isalnum(c) looks much
by tspiteri 16y ago
The C version has a buffer overflow if more than 1024 consecutive alphanumeric characters are input. And a much less serious point,
isalnum(c)
looks much better than
(c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
- pgbovine 16y agoyup, agreed, and if word.endswith('ing') looks much better than if word[-3] == 'i' and word[-2] == 'n' and word[-1] == 'g' clearly the authors of that article weren't proficient in the C standard library :)