How many times is the recursive function called, when the following code is executed?
void myrecursivefunction(int n)
{
if(n == 0)
return;
printf("%d ",n);
myrecursivefunction(n-1);
}
int main()
{
myrecursivefunction(10);
return 0;
}
How many times is the recursive function called, when the following code is executed?
void myrecursivefunction(int n)
{
if(n == 0)
return;
printf("%d ",n);
myrecursivefunction(n-1);
}
int main()
{
myrecursivefunction(10);
return 0;
}
answer should be 11 . i will report this question to the concerned problem setter
i hope this help
please mark doubt as resolved