While writing this code in memory stack visualization ;
main(2048) -> 204 -> 20 -> 2 -> 0. Now, return is executed; then how the workflow would proceed after this?
Workflow of a return statement after execution
@dhruvtrehan45 after the flow of control returns to the function after the recursive calls, the rest of the statements of that function are executed. If a return statement is encountered then the function stops execution at that point, else it is executed till the end of the function is reached and after that flow of control is shifted back to the calling statement. and this continues happening till we reach back to the main function.