There are perhaps 5% of the population that simply *can't* think. There are another 5% who *can*, and *do*. The remaining 90% *can* think, but *don't*.
I am being sponsored by Syntress! They bought me an amazing dedicated server to run catonmat on. If you're looking web services, I highly recommend the Syntress guys!
Education Sponsors
I am being sponsored by A-Writer! If you ever need help with essay writing, look no further than A-Writer! They will help you with your writing in as quickly as 3 hours!
Another bit-based operation:
Switch values of a and b w/o using additional variable
Comment Responses
This is undefined behaviour (i.e. implementation dependent) in C/C++ and it doesn't work in Java.
here you go: a=a^b; b=a^b; a=a^b;
Reply To This Comment