The code works fine in code-blocks but giving error “warning: control reaches end of non-void function [-Wreturn-type]
12 | }”
in CB Ide.
Getting Compile time error
you forgot to write return at line no 8
if arr[0]<=arr[1]
you call recursion to check rest of the array
is it sorted?
if yes you should have to return true else false
so return statement is neccasary
if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved 
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.