Sail E0 Webinar
Question
What is the output of the following code?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;}
Options:
A .  10
B .  1
C .  10 9 8 "¦ 1 0
D .  10 9 8 "¦ 1
Answer: Option D


The program prints the numbers from 10 to 1.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers