Test cases are not passing

My code is compiling successfully but its not passing the test cases

@guptamuskan1305
hello muskan,
pls save ur code at https://ide.codingblocks.com/ and share the generated link here

@guptamuskan1305
hello muskan,
i have already shared the correct code with u .pls check ur chat

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

Muskan, pls use the following approach as,

bool sorted(int *a, int i,int n)
{
if(i==n-1)
{
return true;
}
if(a[i]<=a[i+1])
{
sorted(a,i+1,n);
}
else
{
return false;
}
}