ZILtoid1991 to Programmer Humor@programming.dev · 5 days agoPointers explained:imagemessage-square76linkfedilinkarrow-up1576arrow-down135
arrow-up1541arrow-down1imagePointers explained:ZILtoid1991 to Programmer Humor@programming.dev · 5 days agomessage-square76linkfedilink
minus-squaredejected_warp_corelinkfedilinkarrow-up4·4 days ago*x = dereference or “point to”. Treats the variable x as containing a pointer value. Evaluates to a variable existing at the address in x. &x = reference or “get address of”. Evaluates to the address of x. They’re complimentary operators, so *(&x) cancels out and is equvalent to just x.
*x = dereference or “point to”. Treats the variable
xas containing a pointer value. Evaluates to a variable existing at the address inx.&x = reference or “get address of”. Evaluates to the address of
x.They’re complimentary operators, so
*(&x)cancels out and is equvalent to justx.