title: C-Array Sum using Pointers?
body: <p>I made this program to find the sum of an array using pointer, but it crashes when I run it.  Why is this happening and what did I do wrong?</p>
  
  <pre><code>int GetValue(int *p[], int size)
  {
       int i, sum = 0;
       for(i = 0 ; i &lt; size ; i++)
       {
           sum += *p[i];
       }
       return sum;
  }
  
  int main()
  {
      int Array[6] = { 20, 30, 40, 50, 60, 70 };
      int Array_Sum;
      Array_Sum = GetValue(&amp;Array[6], 6);
      printf("Array Sum= %d", Array_Sum);
      return 0;
  }
  </code></pre>