[Solved] What will be the resulting array after reversing arr[]={3,5,4,2}?

What will be the resulting array after reversing arr[]={3,5,4,2}?

a) 2,3,5,4
b) 4,2,3,5
c) 5,4,2,3
d) 2,4,5,3

Answer: d
Explanation: The resulting array upon reversing after reversal is arr[]={2,4,5,3}. We can implement an algorithm for this purpose in various possible ways.

Comments