Re:The Nitty Gritty of “Hello World” on macOS (2014)
by radiospiel on Wednesday May 06, 2020 @06:07AM
(#23089391)
Shouldn't this be
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?
[ Parent
| on HN ]
Re:The Nitty Gritty of “Hello World” on macOS (2014)
by AlEinstein on Wednesday May 06, 2020 @07:51AM
(#23089928)
You are correct!
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.