As implied by the title, what’s meant to get printed if I do this in C++:
printf("one\0two");
? GCC gives me a warning when I do this, but visual studio is fine with it. Do they work differently at all? Thinking about it, I’d expect printf to stop at the first \0, but apparently the code that uses this has been working fine on windows until now, so I’m not sure.
You’ll get:
the
\0is a null and ends the string. No newline.