Question : https://ide.codingblocks.com/s/436862
Shouldn’t answer be 11 since calls would be for 10,9,…,0.
But answer given is 12.
Question : https://ide.codingblocks.com/s/436862
Shouldn’t answer be 11 since calls would be for 10,9,…,0.
But answer given is 12.
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; }
Yes answer should be 11 only.
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.