r/ProgrammerHumor • • 19h ago

Meme technicallyCorrect

Post image
1.0k Upvotes

42 comments sorted by

View all comments

Show parent comment

5

u/2eanimation 18h ago

i = 0
x = ++i
x == 1 -> true

vs

i = 0
x = i++
x == 0 -> true

1

u/failedsatan 3h ago

not quite, it's more x++ == 0 -> true and ++x == 0 -> false