Home » Programming & Data Structure » Programming and data structure miscellaneous » Question

Programming and data structure miscellaneous

Programming & Data Structure

  1. Consider the following recursive C function.
    void get (int n)
    {
       if (n<1) return;
       get (n–1);
       get (n–3);
       printf(“%d”, n);
    }
    If get (6) function is being called in main () then how many times will the get () function be invoked before returning to the main () ?
    1. 15
    2. 25
    3. 35
    4. 45
Correct Option: B


Total calls = 25



Your comments will be displayed only after manual approval.