Kindly check the code ,test cases are not getting pass

#include<bits/stdc++.h>
using namespace std;
void bracket(char *out,int n,int idx,int open,int close);
int main()
{
int n; cin>>n;

char arr[1000];
int idx=0;
bracket(arr,n,idx,0,0);

return 0;

}
void bracket(char out,int n,int idx,int open,int close)
{
if(idx==2
n)
{
out[idx]=’\0’;
cout<<out<<endl;
return;
}

if(open<n)
{
	out[idx]='(';
	bracket(out,n,idx+1,open+1,close);
}
if(close<open)
{
	out[idx]=')';
	bracket(out,n,idx+1,open,close+1);
}

return;

}

Hello @raj_pareek could you please share your code by saving it on ide.codingblocks.com

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.