Recursion during stack building and falling

sir jab function stack se remove hota h ,then vo next statement execute hoti hai?
agar statement hai uske baad to execute ho jati hai agar statement nahi hai tab kya hota hai?

Hi @skd90650,
If there is no statement after the recursive call then the function normally ends and is removed from the stack and other pending functions in the stack are called. For ex if PI(4) is running and PI(3) is stored in the stack then after PI(4) ends PI(3) will start running

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.