I have been asked this programming question more times than I can remember now.
Question:
Given two variables x and y, how would you swap their values without using a third variable?
Think...
Hmm...
Umm...
Ohhh...
Answer:
------------------
x = x + y;
y = x - y;
x = x - y;
------------------
That's it... ^__^
BitCoin Wallet
18LpeLKyihVfi4bv8NRz2RQZxVeq5m3nFW
Popular Posts
-
Update: --------------- RapidClicker v1.0 has a major bug -> the frame of the window is NOT ALWAYS transparent because I have hard-coded ...
-
Cool, eh? You can easily change your OEM logo and info by following these simple steps: Locate the files OEMINFO.INI and OEMLOGO.BMP in you...
-
I have used TurboNotes and PostIt for the past few years of my computing life. Recently though, I came across this simple but intuitive and ...
-
Alright, Pidgin already served the purpose, but I guess Pandion is too cute to brush aside. So here's another jabber client that is comp...
-
Ever heard of the game Insaniquarium (by PopCap games) ? Sure chipped off a hell lot of my time, ^__^. Long story short, I've coded a he...
-
------------------------------------ Update: 5 more invites left! ------------------------------------ Demonoid.com is a good torrent site....
-
For chrome users out there, here's a useful extension which transforms a website into "plain text" with a simple click. The ba...
-
This tool is mainly useful for programmers who want their releases packed to the bone. Everyone can still use it for shrinking any executabl...
-
So everybody's using FileZilla? I have used it for quite some time too, till I tried WinSCP. WinSCP supports both SFTP and FTP (and also...
-
I really liked the Chrome interface a lot but I didn't want to leave Firefox's streamlined internals... yet. And so I tried to ...
Friday, January 23, 2009
Subscribe to:
Post Comments (Atom)
Archive
-
▼
2009
(32)
-
▼
January
(13)
- Windows XP TechTip #13 >> OEM Info
- Demonoid Account
- Swap X and Y...
- Windows XP TechTip #12 >> Shortcuts
- Windows XP TechTip #11 >> Disable Autoplay
- Windows XP TechTip #10 >> Cmd Here
- Rapid Clicker v1.1
- Windows XP TechTip #9 >> Location
- The EXE packer, UPX
- Windows XP TechTip #8 >> Defaults
- Launchy v2.1.2
- Windows XP TechTip #7 >> Shutdown
- Unlocker v1.8.7
-
▼
January
(13)
No comments:
Post a Comment