Re: brain teasers



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.


.



Relevant Pages

  • Re: brain teasers
    ... did you check the archives, ... When you go back to the idiot that thinks the stupid XOR trick is neat, ... the stupid XOR trick with integer type variables. ...
    (comp.lang.c)
  • Re: brain teasers
    ... When you go back to the idiot that thinks the stupid XOR trick is neat, ... the stupid XOR trick with integer type variables. ... Learn some real programming and leave the crap to people who ...
    (comp.lang.c)