Reverse an array

Moderate
0/80
1 upvote

Problem statement

Take as input N, a number. Take N more inputs and store that in an array. Write a recursive function which reverses the array. Print the values of reversed array.

Detailed explanation ( Input/output format, Notes, Images )
Input Format:
Enter a number N and take N more inputs
Output Format:
Display values of the reversed array (separated by space)
Sample Input :
4
1
2
3
4
Sample Output :
4 3 2 1 
Reverse an array
Full screen
Console