People keep saying that the behavior of
C Interview Questions and Answers
(Continued from previous question...)
People keep saying that the behavior of
Q; People keep saying that the behavior of i = i++ is undefined, but I just tried it on an ANSI-conforming compiler, and got the results I expected.
A: A compiler may do anything it likes when faced with undefined behavior (and, within limits, with implementation-defined and unspecified behavior), including doing what you expect. It's unwise to depend on it, though.
(Continued on next question...)
Other Interview Questions
|