 The Standard Template Library overloads its built-in swap function to exchange the contents of containers efficiently this way.As pointer variables are usually of a fixed size (e.g., most desktop computers have pointers 64 bits long), and they are numeric, they can be swapped quickly using XOR swap.Some languages, like Ruby or Python support parallel assignments, which simplifies the notation for swapping two variables