title: Power set code showing segmentation fault
body: <p>A recursive code to find power set of string is showing error and out of memory.</p>
  <pre><code>void recur(string a,string b,int i=0) // Recursive fun 
  { 
    int n=a.size();
    if(i==n)         //returns if becomes equal to the size of  array
    {
      cout&lt;&lt;b&lt;&lt;endl;
      return ;
    }
    recur(a,b,i++); //calls without append
    recur(a,b+a[i],i++); //calls with append
  }
  
  </code></pre>