How to find the sum of an array using recursion? : <p>need some help figuring out this assignment, I basically have to find the sum of an array using recursion, I can't use any loops and my function could only have 2 arguments which are the array and the array's size. Also this is my first time posting so forgive me for any formatting errors. Working in C++.</p>

<pre><code>#include "stdafx.h"
#include &lt;iostream&gt;
using namespace std;

int arrayFact(int[], int);

int main()
{
   const int SIZE = 4;
   int fArray[SIZE] = { 4, 5, 10, 12, };

  cout &lt;&lt; "test: " &lt;&lt; arrayFact(fArray, SIZE);

  return 0;
}

int arrayFact(int array[], int s)
{
  if (s == 0)
    return 1;
  else
    return array[s] + arrayFact(array, s--);
}
</code></pre>
