the_tech_beast to C & C++ · 3 years agoWhat is the difference between ++i and i++?message-squaremessage-square8fedilinkarrow-up111arrow-down10file-text
arrow-up111arrow-down1message-squareWhat is the difference between ++i and i++?the_tech_beast to C & C++ · 3 years agomessage-square8fedilinkfile-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