Hexaware Technologies Interview Question

Code for reversing an array without using rev function