The C language specification indicates that the last line of output in a text stream may need \n at the end. The language says that this requirement is implementation-defined. This immediately means that in the general case the behavior of the program is not determined if there is no \n at the end in the output line to the text stream.
Behavior is defined only when you are talking about some specific implementation. Some implementation may result in release. Some other implementation cannot produce anything. And another implementation may behave differently.
For your specific implementation (GCC on Linux), I expect to see the result even without the trailing code \n . Maybe there is something about how your shell / terminal is configured, which makes it invisible.
source share