Page 1 of 1

What is the output of the following code?

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) 10
b) 1
c) 10 9 8 … 1 0
d) 10 9 8 … 1