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
glowie
Nuclear Fit
Mars Colonial Republic
Everything2 Decaversary Interviews: go ahead I'll listen
I almost stopped believing in shooting stars
Bread and Circuses
Inland Empire
Everything2 Decaversary Interviews: go ahead I'll listen
Everything2 Decaversary Interviews: go ahead I'll listen
I will wait until your quiet makes me remember I am waiting.
Guanajuato
Words are how we see you. Use them well.
Nuclear Fit
I will wait until your quiet makes me remember I am waiting.
May 11, 2000
The Road To Roswell
A long time ago, under the shady tree in my yard, I was dead
Svalbard International Seed Vault
Mars Colonial Republic
Helen of Wyndhorn
I bear an undivided light
Helen of Wyndhorn
May 11, 2000
Everything2 Decaversary Interviews: go ahead I'll listen
technology singularity
Last and First Men
technology singularity
Everything2 Decaversary Interviews: go ahead I'll listen
tortured artist
Everything2 Decaversary Interviews: go ahead I'll listen
Editor Picks
Darts
Making Herbal preparations - Infused oils
Gordon Cooper
Hank Thompson
theoretical physics
Wyatt Earp
space
The summer after high school
Gender Identity Disorder
Sushi In Its Main Forms
The Quiet American
What's Opera, Doc?
Breath softened fall, angel of always never
Cream
Trieste
New Writeups
system monitor
(
thing
)
by
wertperch
Nuclear Fit
(
event
)
by
Hazelnut
One-Trick Pony
(
thing
)
by
Peaceful Chicken
The Road To Roswell
(
review
)
by
wertperch
Lou Andreas Salome -Babe you left us
(
person
)
by
EmrysK:?
May 13, 2025
(
log
)
by
Peaceful Chicken
technology singularity
(
idea
)
by
Dustyblue
Mars Colonial Republic
(
fiction
)
by
passalidae
May 11, 2025
(
log
)
by
Peaceful Chicken
Everything2 Decaversary Interviews: go ahead I'll listen
(
person
)
by
Decaversal Studios
(
more
)