Swap the values of 2 int variables

So what's the advantage of reference over pointers?