R
Richard Bos
Martin Dickopp said:Let's assume an implementation that has documented that the last line
requires a terminating newline character. On such an implementation,
the following program is not correct:
#include <stdio.h>
int main (void) { putchar ('x'); return 0; }
I would have thought the behavior of the program is undefined on such an
implementation. If that is not the case, what is the behavior of the
above program on such an implementation?
However that implementation defines it; and note that, because this is
implementation-defined, not undefined, the implementation must define
this some way or other _and_ document this choice. So: read your
implementation's documentation for the answer to your question.
Richard