>>105948747 (OP)this is very surprising the first time it happens, but basically the reason why is because pointer arithmetic takes into account the underlying type that's being pointed to.
in other words, the following are equivalent:
int *b = a + 5;
int *b = &a[5];
but the second one makes it much more obvious.
for this reason i always 'index' into pointers, since it prevents this kind of misunderstanding.
if you first cast `a` to a void pointer, then it will print what you originally expected:
int *b = (void *)a + 5;
however this may cause problems on some architectures which expect integer load/stores to be aligned on power-of-two boundaries, possibly slow down performance, in extreme case it will trigger a system trap.