Can you be more specific about what confuses you?
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
Each time the function calls itself, it calls itself with a slice of the array. The first element is sliced off, which means b[1] becomes b[0] for the next call. Repeating that process while decrementing size until size is 0 produces the recursive equivalent of a reverse traversal loop:
for (int i = size - 1; i >= 0; i--)
printf("%d ",b[0]);
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
The function returns too. What happens after that?
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401