Domanda di colloquio di Cognizant

They asked me to write a code to reverse an array and print