4 ms·
That was fun to read. Why do you need a terminating null (juz)?
by brown-dragon 11y ago
That was fun to read. Why do you need a terminating null (juz)?
- JoshTriplett 11y agoIt isn't actually used in printf; there's one more argument than there are %c specifiers. gcc -Wall warns about that.
- brown-dragon 11y agoGood 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 agoIf you added another %c, it would print the NUL to stdout; it doesn't terminate anything.
- brown-dragon 11y agoYou're right. My mistake.