
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
For further actions, you may consider blocking this person and/or reporting abuse
John Robertson -
Adam Crockett -
Natália Oliveira -
YJDoc2 -
Once suspended, programmerrush will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, programmerrush will be able to comment and publish posts again.
Once unpublished, all posts by programmerrush will become hidden and only accessible to themselves.
If programmerrush is not suspended, they can still re-publish their posts from their dashboard.
Discussion (4)
While it does have some educational value to show that this is possible, this method has two issues:
Both
a = a + b
anda = a - b
can cause an overflow.I can't imagine many situations where saving a few bytes really makes up for the loss in readability.
It also works with XOR (avoiding the overflow problem):
Agreed, this is definitely the way to do it.
reduced to one line:
a ^= b ^= a ^= b;