in this explaination video in the if block …
if(in[i] == ‘\0’
{
out[j] = ‘\0’;
cout<<out<<endl;
return;
}
as you can see after printing char array out …return statemet is executed …and if return is executed then how this code is generating output for other substrings .
My doubt is if once a return statement is executed …the function could have terminated but it didnt happened.
Cocept problem ...return statement in the if block
hi @Gaurav_dev
in recursion
function calls another function this happens till base case hit
so when you return from a funtion then it goes there from where it is called
means to another function
program will not terminate
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.