According to ISO/IEC 9899:2017:
A strictly conforming program shall use only those features of the language and library specified in this document. It shall not produce output dependent on any unspecified, undefined, or implementation-defined behavior, and shall not exceed any minimum implementation limit.
However, a few pages later, it says:
The active position is that location on a display device where the next character output by the
fputcfunction would appear. The intent of writing a printing character (as defined by theisprintfunction) to a display device is to display a graphic representation of that character at the active position and then advance the active position to the next position on the current line. The direction of writing is locale-specific. If the active position is at the final position of a line (if there is one), the behavior of the display device is unspecified.
Since there doesn't seem to be any way to tell if the active position is at the final position of a line, then there is no way to output to the display device without risking invoking unspecified behavior, and as such it's impossible to write a strictly conforming program. Is this a mistake or is there something I'm missing?
Agreed, but the requirement on a strictly-conforming program is not that it avoid all unspecified behavior, but rather that
The output produced is a function of the program. The behavior of a device to which that output is directed is a function of the device, separate from the output itself, and whether that behavior is specified or well defined is not relevant to whether the program conforms strictly.
It is not possible for a strictly-conforming program to know or control whether any output it produces is directed to the (a) display. But when it is, that does not impact the program's conformance. In that sense, yes, it is possible to write a strictly conforming program that outputs to a display device. Doing so is not any harder than writing a strictly conforming program that outputs to a regular file.