@the_tech_beast to C & C++ • 3 years agoWhat is the difference between ++i and i++?message-square8arrow-up111arrow-down10file-text
arrow-up111arrow-down1message-squareWhat is the difference between ++i and i++?@the_tech_beast to C & C++ • 3 years agomessage-square8file-text
minus-square@vhstape@beehaw.orglinkfedilink2•11 months 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