this post was submitted on 24 Aug 2021
3 points (100.0% liked)

C & C++

59 readers
6 users here now

founded 5 years ago
MODERATORS
 

I haven't really understood the difference between

i++ and ++i

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 year ago

i++ gives the current value of i and then increments it, while ++i increments it and returns the new value