Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
JoshTriplett
on June 23, 2015
|
parent
|
context
|
favorite
| on:
C Puzzles
It isn't actually used in printf; there's one more argument than there are %c specifiers. gcc -Wall warns about that.
brown-dragon
on June 23, 2015
[–]
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
on June 23, 2015
|
parent
[–]
If you added another %c, it would print the NUL to stdout; it doesn't terminate anything.
brown-dragon
on June 24, 2015
|
root
|
parent
[–]
You're right. My mistake.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: