//Program to get all the subsets/powersets of any array #include #include using namespace std; void GetSubsets(int nums[],int index,vector arr1,int n){ if(index == n){ for(auto it:arr1){ cout<< it<<" "; } cout< arr3; GetSubsets( arr2 ,index,arr3,n); }