Check an array is sorted or not using recursion?

https://ide.codingblocks.com/s/58475

my code is working fine for input values 4 like
n=4 values= 1,2,3,4 ///working fine
but for
n=5 values = 1,2,3,4,5 //not working properly why?

https://ide.codingblocks.com/s/58575
you are not using recursion properly.
Try this code