Please explain my doubt

Here with every recursive call we are comparing a[0] and a[1] ,but how is a[0] and a[1] incrementing every time.
Wouldn’t a[0] and a[1] be fixed. How are we changing the numbers pointing to index 0 and 1 every time?
in the isSorted(a+1,n-1) every time a new array with different indexes is created?

hello @isingh

check the first argument of this function call , here instead of passing base address we are passing address next to base address right?
so in each recursive call a[0] and a[1] are different .
ex->
if array is [1,2,3,4]
then array in
first call-> [1,2,3,4]
second call -> [2,3,4]
thired call -> [3,4]
so on

So after every call the array passed to the function changes and so accordingly the index of element changes?

yeah right . … . . . . .

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.