title: Recursion C: What happen in the Stack?
body: <p>I'm beginner in recursion and I did this code</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int ft_recursive_factorial(int nb)
  {
      if (nb &gt; 1)
      {
          return(nb * ft_recursive_factorial(nb - 1));
      }
      return(1);
  }
  
  int main()
  {
      printf("%d\n",ft_recursive_factorial(3));
      return(0);
  }
  
  
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <pre><code>6
  </code></pre>
  
  <p>I think the code is correct but i can't understand what happen in the stack...
  In my mind this happening:</p>
  
  <p>| Stack |<br />
  | return(1 * ft_recursive_factorial(1 - 1)) |<br />
  | return(2 * ft_recursive_factorial(2 - 1)) |<br />
  | return(3 * ft_recursive_factorial(3 - 1)) |<br />
  In this schema the code would be stop at <code>return(1 * ft_recursive_factorial(1 - 1))</code> because of the return answer (in my mind).</p>
  
  <p>Can someone explain me what happening in the stack ? please.</p>