NTT DATA Interview Question

Write a program to reverse an array.