While it is strictly undefined behaviour and anything is allowed to happen, however compilers are seldom arbitrary in their treatment of of such code and the result can be explained in this case as:
(i - j) == ((60 - 20) / sizeof(int))
But be aware that in some circumstances it may not apply; it may for example be dependent on the target memory architecture, or the relative alignment of the objects.