Help me in solving DNASTRAND problem

My issue

what is wrong with this code?

My code

#include <iostream>
using namespace std;

int main(){
    int t;
    cin>>t;
    while(t--){
   int n;
   cin>>n;
    char N;
    cin>>N;
    char OutputChar;
    if(N=='A'){
        OutputChar='T';
    }
    else if(N=='T'){
        OutputChar='A';
    }
    else if(N=='C'){
        OutputChar='G';
    }
    else if(N=='G'){
        OutputChar='C';
    }
    else{
        cout<<"Please enter a valid Input"<<endl;
        continue;
    }
    cout<<OutputChar;
    }
    return 0;
}


Problem Link: DNASTRAND Problem - CodeChef

once see this code i have done code for you

include
using namespace std;
int main()
{
int n,b,i;
char a[100],d[100];
cin>>n;
while(n–)
{ cin>>b;
for(i=0;i<b;i++)
{
cin>>a[i];
}
for(i=0;i<b;i++)
{
if(a[i]==‘A’)
{
d[i]=‘T’;
}
if(a[i]==‘T’)
{
d[i]=‘A’;
}
if(a[i]==‘C’)
{
d[i]=‘G’;
}
if(a[i]==‘G’)
{
d[i]=‘C’;
}
cout<<d[i];
}
cout<<endl;

}

}

you did not give size to char “outputchar” and after use for loop for saving the output int outputchat[i]…