Question d’entretien chez Cognizant

Write a code to swap the numbers in an array.