Re:C Puzzles
by brown-dragon on Monday June 22, 2015 @11:53PM
(#9762517)
That was fun to read. Why do you need a terminating null (juz)?
Re:C Puzzles
by JoshTriplett on Tuesday June 23, 2015 @12:50AM
(#9762683)
It isn't actually used in printf; there's one more argument than there are %c specifiers. gcc -Wall warns about that.
Re:C Puzzles
by brown-dragon on Tuesday June 23, 2015 @01:16AM
(#9762755)
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.
Re:C Puzzles
by JoshTriplett on Tuesday June 23, 2015 @02:09AM
(#9762887)
If you added another %c, it would print the NUL to stdout; it doesn't terminate anything.
Re:C Puzzles
by brown-dragon on Wednesday June 24, 2015 @04:43AM
(#9770385)
You're right. My mistake.
http://students.mimuw.edu.pl/~dj189395/nhp/czynic/programy/t...