News for hackers. Stuff that matters.
Re:Low Level Bit Hacks You Absolutely Must Know by jibiki on Tuesday June 30, 2009 @06:51PM (#681758)
He meant if they are the same variable, not the same value. (E.g., you pass pointers to your function.)

  int swap(int * a, int * b)
    {
    (*a)^=(*b);
    (*b)^=(*a);
    (*a)^=(*b);
    }
  int x = 15;
  int *y = &x;
  int *z = &x;

  swap(y,z);  //Now *y == 0

There are no comments on this comment yet.