Re: brain teasers
- From: Martin Ambuhl <mambuhl@xxxxxxxxxxxxx>
- Date: Wed, 04 Apr 2007 07:04:52 -0400
viv342 wrote:
how can two variables be swapped without using a third variable?
You didn't check the FAQ before posting this trite question, did you? Nor did you check the archives, did you?
When you go back to the idiot that thinks the stupid XOR trick is neat, ask him what he does with non-integer variables. And ask him how he knows the compiler doesn't generate a hidden third variable even when he uses the stupid XOR trick with integer type variables. And if he gives you a one-line answer, it is sure to violate constraints even on integer variables. Learn some real programming and leave the crap to people who place bar bets for drinks.
.
- Follow-Ups:
- Re: brain teasers
- From: Malcolm McLean
- Re: brain teasers
- From: rohitjogya@xxxxxxxxx
- Re: brain teasers
- References:
- brain teasers
- From: viv342
- brain teasers
- Prev by Date: Re: K&R2, 1.5.3, exercise 1-10
- Next by Date: Re: brain teasers
- Previous by thread: Re: brain teasers
- Next by thread: Re: brain teasers
- Index(es):
Relevant Pages
|