Page 1 of 1

How many times is the recursive function called, when the following code is executed?

Posted: Wed Jul 13, 2022 6:16 pm
by answerhappygod
void my_recursive_function(int n)
{
if(n == 0)
return;
printf("%d ",n);
my_recursive_function(n-1);
}
int main()
{
my_recursive_function(10);
return 0;
}
a) 9
b) 10
c) 11
d) 12