3 ms·
So you bothered to print 500 pages instead of just saying "you can't do that but most likely it will grab value of neighboring variables"?
by stackedinserter 2y ago
So you bothered to print 500 pages instead of just saying "you can't do that but most likely it will grab value of neighboring variables"?
- kazinator 2y agoIf 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.