My code is correct but its failing all test cases

My code is - https://ide.codingblocks.com/s/429598

Hey @sukritbansal01 do this

    if(c<o)
    {
        a[i]=')';
        generate_brack(a,n,i+1,o,c+1);
    }
    if(o<n)
    {
        a[i]='(';
        generate_brack(a,n,i+1,o+1,c);
    }
    

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.