I Do Not Know C: Short quiz on undefined behavior (2015)
I&#x27;ll be honest, I didn&#x27;t find any of these to be particularly surprising. If you&#x27;ve been using C and are familiar with strict-aliasing and common UB issues I wouldn&#x27;t expect any of these questions to seriously trip you up. Number 2 is probably the one most people are unlikely to guess, but that example has also been beaten to death so much since it started happening that I think lots of people (Or at least, the people likely to read this) have already seen it before.<p>I&#x27;d also add that there are ways to &#x27;get around&#x27; some of these issues if necessary - for example, gcc has a flag for disabling strict-aliasing, and a flag for 2&#x27;s complement signed-integer wrapping.