This will always invoke undefined behavior.
You're indexing out of bounds, you can't do that without getting undefined behavior.
Exactly what happens is, wait for it, undefined. It can cause a segfault, there might be no problem at all and some value might get printed, you just can't know.
If even nothing "bad" happens and some value is printed, the program is still faulty and broken.
Also, of course there's no difference between this and just
printf("%x\n", str[101]); /* BAD CODE! */
The fact that you compute the invalid array index by adding two valid dereferences doesn't matter, that's just an extra layer of confusion. Also, you can't "know" that 1
+ 4
is any particular numerical value, that's up to the target machine's character encoding. In ASCII, it will be 49 + 52, i.e. 101. You can't even know that '1'
+ '4'
is positive.