Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
nathell
· 11y ago · 0 comments
One of these reminded me of my woeful attempts at IOCCC-like code, a Hello World implementation:
http://students.mimuw.edu.pl/~dj189395/nhp/czynic/programy/t...
Comments
[–]
brown-dragon
11y ago
That was fun to read. Why do you need a terminating null (juz)?
[–]
JoshTriplett
11y ago
It isn't actually used in printf; there's one more argument than there are %c specifiers. gcc -Wall warns about that.
[–]
brown-dragon
11y ago
Good catch! And even if we do add another "%c" to fix it, I don't know why we would need to null-terminate a null-terminated string.
[–]
JoshTriplett
11y ago
If you added another %c, it would print the NUL to stdout; it doesn't terminate anything.