Why it gives wrong Result

void printBrackets(int n ,string s,int oc ,int cc )

{

  if(oc ==n && cc == n){
      cout<<s<<"\n";
      

      return;

  }
  if(oc<n){
      s += "(";
      printBrackets(n,s,oc +1,cc);
  }
  if(oc>cc){
      s += ")";
      printBrackets(n,s,oc,cc+1);
  }

}

(())

(()()