&
can be thought of as an address of (<something>)
operator. So &q
is address of q. Now *
can be thought of as an value at (<something>)
operator. So *q is basically the value stored at the address contained in q, i.e, *
treats the variable as always containing an address. Now *&q, by associativity is *(&q). Which means
value stored at (address of q)
which is same as value stored at q
address of q will be having another address since q is a pointer. So it is the same as
p=q