Examveda

What does the following recursive code do?
void my_recursive_function(int n)
{
     if(n == 0)
     return;
     my_recursive_function(n-1);
     printf("%d ",n);
}
int main()
{
     my_recursive_function(10);
     return 0;
}

A. Prints the numbers from 10 to 1

B. Prints the numbers from 10 to 0

C. Prints the numbers from 1 to 10

D. Prints the numbers from 0 to 10

Answer: Option C


This Question Belongs to Data Structure >> Miscellaneous On Data Structures

Join The Discussion

Related Questions on Miscellaneous on Data Structures