title: C - recursive function for sum of n natural numbers
body: <p>Below is the recursive function for sum of natural numbers up to <code>n</code>.</p>
  
  <pre><code>int calculateSum(int n) {
      if (n == 0){
          return 0;
      }else{
          return n + calculateSum(--n); //Replacing --n with n-1 works
      }
  }
  </code></pre>
  
  <p>Input: 5</p>
  
  <p>If I <strong>use <code>--n</code></strong> then the <strong>output is 10</strong>, but when I <strong>replace <code>--n</code> with <code>n - 1</code></strong> then the correct result is returned (15). Why the difference?</p>