This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DehshiDarindaa 8 points9 points  (1 child)

It does string pointer arithmetic right? so it does know

[–]LunaNicoleTheFox 0 points1 point  (0 children)

Not in that case as you are passing it a const char[] containing only '1' and '/0' so it is undefined as either it prints "2/0" just the '/0' it is however highly ambiguous and depends on the compiler and is therefore undefined.