Test case not passing

#include
#include
using namespace std;
void brackets(int n,char out,int open,int close,int i,int j){
if(i==2
n){
cout<<out<<endl;
return ;
}
if(open<n){
out[j]=’(’;
brackets(n,out,open+1,close,i+1,j+1);
}
if(close<open){
out[j]=’)’;
brackets(n,out,open,close+1,i+1,j+1);
}
return ;
}
int main(){
int n;
cin>>n;
char out[10000];
brackets(n,out,0,0,0,0);
return 0;
}
output is correct but none of the test case is passing

hello @professor
pls save ur code here-> https://ide.codingblocks.com/
and share the link with me

image
interchange the position of these two if statements to print the output in required format

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.