Alter Domus interview question

Program for swaping 2 numbers, finding sum of elements in array & average ?