I disagree. You have to learn the ways in which things fail in any language you learn, especially a language like C.
I disagree. You have to learn the ways in which things fail in any language you learn, especially a language like C.
If you want to know how things can fail (or, what things can fail in unspecified ways), you have to do a bit of reading and no amount of trying and experimenting will conjure that knowledge.
Yeah, that's the point. Chasing that knowledge is pointless. Instead, read the spec and find out what is legal and what is not. What is defined and what is not. Then you can stop worrying about how things fail and start worrying about not doing those things.
All people have learned from the last 40 years of C is how to write ridiculously insecure applications.
Reading the standard may not be the optimal choice, or even the first choice, but common teaching methods are nearly guaranteed to produce crap results in the specific case of C programming.
Point of disagreement: no amount of C expertise makes a hand-written C codebase safe. Vulnerabilities and undefined behaviour are often found even in code written by top-flight C programmers.
One of them was certainly this one: https://devblogs.microsoft.com/oldnewthing/20140627-00/?p=63...
This is readable: http://web.archive.org/web/20140629013829/http://blogs.msdn....