Test case Querry

At the time of programme input Testcases were passed correctly butt at the time of submitting code a test case is executing to be wrong which is already have been test by me in input. Approved pls link IDE https://ide.codingblocks.com/s/107030

Firstly, you need to take the inputs from user, since the code has various test cases, so take a input from user. Secondly you are using wrong approach, use
if( arr[ 0 ] <= arr[ 1 ] && sortarray(ar+1,n-1)
{
return 1;
}