The result of one pointer minus another pointer is the number of elements between them, not the number of bytes.
int **ptr=p;
ptr++;
ptr
moves forward one element, so ptr - p
has a value of 1
.
BTW, this behavior is consistent with ptr++
(which means ptr = p + 1;
in your example.