In a recent question on the site, a meme about certain expressions in a programming language is shown, asking how one of them works.
The meme was the following:
The question was how it worked i -=- 1
. However, the one that really caught my attention was the last one: i = ~-i
does this really serve the same purpose as the previous ones, that is, to increase i
by 1?
If so how does it work?