Near Matches
Ignore Exact
Full Text
Everything
2
how to exchange two variables without using a third (idea)
See all of How to exchange two variables without using a third
, there are 5 more in this node.
See also:
XOR swap
(
idea
)
by
AlephNot
Wed Aug 22 2001 at 0:17:28
Don't forget the following line in C:
a ^= b ^= a ^= b;
It may not be obvious but, assuming a and b are integers, this single line swaps the values in a and b. It takes advantage of the fact that, given x XOR y = z, you can determine any of x, y, or z, given the other two. Pretty nifty, if you ask me.
-----
Ok, I just now noticed the "xor swap" node has this exact idea already there. I swear I DID NOT see it there until after I posted this writeup, but if you don't believe me, I'll understand.
TMTOWTDI
machine epsilon
Female restroom etiquette
XOR swap
Impossible Nintendo Cartridges
Why I got my tattoo
Any sufficiently nice person is indistinguishable from someone who likes you
How to exchange two variables by using a third
When I have female children
catastrophic cancellation
XOR
Experiences With Shaving
Why?
Young Virgin Auto-Sodomized by Her Own Chastity
polymorphic virus
Perl
String Theory
How I plan to use Spain
Starbucks and Starbucks
The Book of Who Cares
Søren Kierkegaard
Sign In
Login
Password
Remember me
Lost password
Sign Up
Need help?
accounthelp@everything2.com
Recommended Reading
About Everything2
User Picks
July 22, 2025
On the Mechanical Impossibility of Sexual Practices as Depicted in Ropy Erotic Novels
on the other hand
Life of Cat
Practical Examples for the Harm Reductionist
The light hurts, why won't it touch us gently?
icebreaker
icebreaker
The light hurts, why won't it touch us gently?
Mountains of the Moon
this is a please this is a please
Beauty of a thunderstorm
or maybe a calm voice, that accent you don't think you have
ABCs of Worldbuilding
14, in dog years
Septology
Parkour
Septology
The four major Chinese inventions
On the Mechanical Impossibility of Sexual Practices as Depicted in Ropy Erotic Novels
Every day, in every way, I strive to be a danger to myself and others
Beauty of a thunderstorm
July 9, 2025
Every day, in every way, I strive to be a danger to myself and others
There are places in this world where mundane, forgotten things have learned to weave their own magic
On the Mechanical Impossibility of Sexual Practices as Depicted in Ropy Erotic Novels
There are places in this world where mundane, forgotten things have learned to weave their own magic
All the Things We Bury
Every day, in every way, I strive to be a danger to myself and others
Every day, in every way, I strive to be a danger to myself and others
Editor Picks
knuckleball
Ottoman Empire
Gettysburg Address
Roman Empire
Risotto
The Raven (The Edgar Allan Porn version)
Alfred Hitchcock
Fuck the models
Phaethon
My first protest
Q
cigarette
Using gzip to do computational linguistics
Encyclopedia on a toothpick
Kanaka
New Writeups
July 22, 2025
(
log
)
by
liha
Septology
(
review
)
by
Glowing Fish
Heaven’s Light Our Guide
(
fiction
)
by
Oliver Smith
Every day, in every way, I strive to be a danger to myself and others
(
personal
)
by
The Custodian
Every day, in every way, I strive to be a danger to myself and others
(
personal
)
by
haqiqat
On the Mechanical Impossibility of Sexual Practices as Depicted in Ropy Erotic Novels
(
event
)
by
Hazelnut
How to Dodge a Cannonball
(
review
)
by
Glowing Fish
to share
(
idea
)
by
raincomplex
He Asked Me for Water but I Gave Him Ice
(
personal
)
by
lostcauser
icebreaker
(
review
)
by
Hazelnut
(
more
)