title: How to find all possible subsets of a given array?
body: <p>I want to extract all possible sub-sets of an array in C# or C++ and then calculate the sum of all the sub-set arrays' respective elements to check how many of them are equal to a given number.</p>
  
  <p>What I am looking for is the algorithm.  I do understand the logic here but I have not been able to implement this one by now. </p>