> as your comment, why do my example 2 print : "Hello" and "Hello World"?
Because it can.
The code is still broken, but one of the really annoying things about broken code is that despite all your efforts to make a mess of it, it still manages to produce the answer you expect.
Therein lies the trap. Just because you got the answer you expected, that in itself is NOT an argument that your code is bug free.
You make a small change, like calling printf in getmessage, and you mysteriously achieved success.
The problem is, you can make another small change and it can just as easily stop working.