title: finding sum of array elements using recursion
body: <p>Finding sum of elements in an array using recursion</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  /* run this program using the console pauser or add your own getch, 
    system("pause") or input loop */
  int max(int a[],int b,int x)
  {
      if(a[x]!='\0'){
          return a[x]+max(a,b,x+1);
      }
  }
  
  int main()
  {
      int a[30],b,x,c;
      scanf("%d",&amp;b);
      for(x=0;x&lt;b;x++){
          scanf("%d",&amp;a[x]);
      }
      x=0;
      c=max(a,b,0);
      printf("%d",c);
  }
  </code></pre>
  
  <p>Input :10
         1 2 3 4 5 6 7 8 9 10<br>
  expected output : 55<br>
  actual output : 102</p>