title: Passing an array to a function and subset sum program
body: <p>I'm trying to create a programm to find all subsets whose elements sum to a specific target. My logic is : Let's say I have an array of 6 elements like this one
  <code>{3,2,4,1,1,9}</code>.</p>
  
  <p>To find a subset whose elements sum to the number 5, all I have to is get the first element and if its value is smaller than 5 then I move to the next elements of the array and I look for subsets whose elements sum to the difference : 5-value of the first element and so on.
  Of course if the value of the element is greater than 5 then I move to the next element.</p>
  
  <p>I've been trying to do this with a recursive function in which I will pass my array.</p>
  
  <p>My problem is that I can't understand how to pass my array into my function and how am I supposed to move to the next element using my function again. To be my honest I did my research on this topic and I couldn't really find anything that helped me.</p>
  
  <p>I use C and I declare my function like this <code>void subset(int x[],int n);</code> where <code>n</code> is the number of the elements of my array. I can't really understand the <code>x[]</code> part. My brother told me to do it like this but I can't really understand why.</p>