Recursion increasing

in the increasing part when the stack is like f(5),f4,f3,f2,f2,f1,f0 and f(0) returned nothing then the control will come to next line or it will first complete the function call 5 times

Since the print statement is after the recursive call…it will get executed once the recursion reaches its base case and returns something.
So stack is getting filled in the order f(5), f(4),f(3),f(2),f(1), f(0) base case.
Once the base case is reached…the elements of the stack is popped one by one…and the print statement is executed… So the order comes out as 0,1,2,3,4,5.