Program to reverse an array