ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 22 hours agoPointers explained:lemmy.worldimagemessage-square62fedilinkarrow-up1500arrow-down126
arrow-up1474arrow-down1imagePointers explained:lemmy.worldZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 22 hours agomessage-square62fedilink
minus-squaredejected_warp_core@lemmy.worldlinkfedilinkarrow-up4·edit-23 hours 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.