The more normal way to swap them is to use a temporary variable:
int a = 1;
int b = 5;
int tmp = a;
a = b;
b = tmp;
This is a little safer when using floating point values as you can get distorted results due to imprecise arithmetic caused by the way floating point values are stored. The difference is normally pretty tiny, but using a temporary variable eliminates the problem (and is often more efficient).