A little difficult problem of *finding all subsets of a set can be solved very easily with bit-wise operations.*
Lets say, Set has n elements. We will use the bits of numbers to show the presence of element in set. The key is - If xth bit in number is SET i.e. 1, then xth element in given set is present in current subset. Got it? We will loop from 0 to (2 raised to n) -1, and for each number num, we will check the SET bits in it and take corresponding elements. In each iteration, we will have one subset.
At the end we will have all 2^n subsets of set. Once you have a subset, you can find the sum of that subset if asked.