Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
TazeTSchnitzel
· 5y ago · 0 comments
sprintf tells you how many characters it has written, so there's no reason you can't use it for non-null-terminated strings.
Comments
[–]
comfydragon
5y ago
williamvds's point is that the first argument to printf is still itself a null-terminated string, so it's basically turtles all the way down if you're using the C standard library.
[–]
TazeTSchnitzel
OP
5y ago
Their comment talked about two things, and the sibling comment addressed the other one.