I’m working through the C book and am currently on Ex17. In trying to break the program, I remove NULs wherever possible to see what happens. Of course, it compiles without a problem. When I run the program, it doesn’t print any random junk where the null was removed. It looks like I never took out the null at all. GDB prints out a bunch of stuff about various files not existing – vprintf.c in particular – but that seems to happen with or without errors (that’s another question – what’s that all about?) At the end, GDB prints out that everything ran fine and exited normally. How is that possible? Curious to know about this sort-of-magic.
I’m running an Ubuntu (18.04 if that matters) VM on a Win10 host machine.