a is a array of integers... a is memory address of a[0] and a+1 is memory address of a[1] and etc...
p is array of pointers... p memory address of p[0] and p+1 is memory address of a[1] and etc...
note that value of p and address of a's are comparable... And it is comparing memories... Means how much distance btw them
ptr is a pointer to pointer. means which can take address of pointer.. Therefore value of ptr and address of p is comparable..
*ptr++ ====> *(ptr++) from associavity and precedence rules..
*++ptr ====> *(++ptr) from associavity and precedence rules..
++*ptr ====> ++(*ptr) from associavity and precedence rules..
according to these basics....