Why don’t I get a segmentation fault when I write beyond the end of an array?

Because undefined behavior == anything can happen. You’re unlucky that it doesn’t crash, this sort of behavior can potentially hide bugs.

As for a being define twice – that’s a bug in the compiler.

Leave a Comment