Here is the code (valid C and C++)
#include int main() { printf(\"asfd\"); // LINE 1 return 0; }
If in line 1
When main() exits, all open streams are closed... to include stdout. Closing the open stream flushes stdout and what you've written to the buffer gets committed with or without the newline.
main()
stdout