2 ms·
If I recall, that question required naming the value that would be produced, not just articulating some speculation about what it might be. I was taken aback,
by kazinator 2y ago
If I recall, that question required naming the value that would be produced, not just articulating some speculation about what it might be.
I was taken aback, so I went to the interviewer: how am I supposed to answer this, is it a trick question about undefined behavior? The compiler is allowed to just flag that with a diagnostic and even terminate after that.
He was like, what do you mean, undefined? It's just straightforward: what is the value? He had no idea what undefined means, or what is a language standard.