In C or C++, it is very common to see questions like these asking about undefined behaviour. For those of you who don't usually use these languages: programming constructs that would usually produce errors in other languages (running off the end of an array, accessing deleted memory, and many many other programming errors) instead invoke "undefined behaviour" which means that anything effectively is permitted to happen (ranging from the program appearing to work, to outright crashes, to random jibberish on screen, etc.).
This is a really, really common topic for beginner programmers to get hung up on. They try a few permutations of their code (which is at this point exhibiting undefined behaviour), find out that some permutation accidentally causes their code to work, and post on SO hoping to understand why X works while Y doesn't.
They then get a nice answer saying that "well actually neither work, UB!". A lot of users seem deeply unsatisfied with this response. Lately I've been trying to explain in some way why these programs may behave in one way or another (e.g. explaining that it may be due to stack layout, or heap reuse, or some other factor), with the goal of trying to demystify this a bit.
I know the C/C++ specs don't say what happens, and in theory beginners should learn "pure" C/C++. But on the other hand, sometimes appreciating the underlying implementation details as I do may help to gain more insight into the code, and may help people avoid bad situations (since it is not always clear that something is UB).
Is this misguided? Should I just point them to "undefined behaviour" and leave it at that?