the_tech_beast@lemmy.ml to C & C++@lemmy.ml · 3 years agoWhat is the difference between ++i and i++?message-squaremessage-square4fedilinkarrow-up13arrow-down10file-text
arrow-up13arrow-down1message-squareWhat is the difference between ++i and i++?the_tech_beast@lemmy.ml to C & C++@lemmy.ml · 3 years agomessage-square4fedilinkfile-text
minus-squarevhstape@beehaw.orglinkfedilinkarrow-up2·1 year agoi++ gives the current value of i and then increments it, while ++i increments it and returns the new value
i++
gives the current value ofi
and then increments it, while++i
increments it and returns the new value