3 ms·
> reading from stdin isn’t challenging, nor writing to stdout. Unless you're Kernighan and Ritchie, who semi-famously wrote a buggy hello world program and use
by ddulaney 4y ago
> reading from stdin isn’t challenging, nor writing to stdout.
Unless you're Kernighan and Ritchie, who semi-famously wrote a buggy hello world program and used it to educate a generation of C programmers: https://blog.sunfishcode.online/bugs-in-hello-world/ https://blog.sunfishcode.online/bugs-in-hello-world/
Obviously an exaggeration, but when's the last time you checked the return value of printf? I know I don't. And that's not even a memory safety bug, just basic logic. I hope nobody trusts those guys around malloc and free :)