The Nitty Gritty of “Hello World” on macOS (2014)
reinterpretcast.com
reinterpretcast.com
They're super neat for first-pass "is this structured or random data" analysis of binary files.
fwrite("Hello, world!\n", 1, 14, stdout)
instead? After all, the string is 14 characters in length, not including the terminating NUL char. What does writing a NUL char to stdout do, anyways?To answer your question, writing a NUL char to stdout is no problem. Some utilities can actually use it as a delimiter since it’s so uncommon. I think most shells would just print nothing on the screen.