Call stack SEQUENCE

in the last lecture it is writen that next function after main is factorial and then NCR but you explained that after main the NCR would come and it will call for factorial.
I was thinking that after main factorial would come and after it return value it vanishes and memory goes to main and from there NCR is called then factorial .
PLEASE EXPLAIN.

Hello @tejuschaturvedi0 actually I didn’t understand about which topic you are talking.
Can you please share screenshot and code also if you have written?

I am attaching the screenshot of topic.

I was thinking that after main factorial would come and after it return value it vanishes and memory goes to main and from there NCR is called then factorial .
PLEASE EXPLAIN.

Hello @tejuschaturvedi0 yes you are right.
But I think in video sir is talking about the call stack from ncr function call omwards from main.

I am asking that he has written main then he called factorial function in cout so factorial should come after main in stack and then after completion of its value the flow should go to main and then NCR .
Like this in bucket when main starts

NCR
Factorial
Main .
And will it change after each flow of function

@tejuschaturvedi0 yes right you are saying right and yee as the return statement is encountered then the flow of that function will be no more in call stack.

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.