As mentioned in comments *
and &
have different semantics depending if they appear in declarations or statements:
*j
Dereferences j
&j
Takes the address of j
**j
Double dereferencing a single pointer (Error)
*&j
Dereferences the address of j
(equivalent to j
)
*k
Dereferences k
(yields another pointer)
&k
Takes the address of k
**k
Double dereferences a double pointer (OK)
*&k
Dereferences the address of k
(equivalent to k
)
&*k
Takes the address of the dereferenced pointer
See a live demo
Note:
address for j pointer - whats the type of address? (Hexadecimal value)
The hexadecimal value is only used as usual representation for pointers, otherwise these are just numbers / values. Hexadecimal doesn't qualify for a type, it's just a numerical representation.