Feedback for XORMAX problem

Problem Link: XORMAX Problem - CodeChef

Feedback

include
using namespace std;

int main() {
// your code goes here
int t;
cin>>t;
while(t–){
string a;
string b;
/* getline(cin,a);
getline(cin,b);
*/
cin>>a;
cin>>b;
// 0 0 1 1
// 1 0 1 1
int counta=0;
int countb=0;

for(int i=0;i<a.size();i++){
if(a[i]==‘0’){
counta++;
}
}
for(int i=0;i<b.size();i++){
if(b[i]==‘0’){
countb++;
}
}
int z= max(counta,countb);
int c=min(counta,countb);
int k=(counta+countb);
int o=k-z;
char s[1000000];
if(k<a.size()){
for(int i=0;i<k;i++){
s[i]=‘1’;
}
for(int i=k;i<a.size();i++){
s[i]=‘0’;
}
}

else if(k>a.size()){
for(int i=0;i<o;i++){
s[i]=‘1’;
}
for(int i=o;i<a.size();i++){
s[i]=‘0’;
}

}
//cout<<k<<endl;
cout<<s<<endl;
}
return 0;
}
why this code is wrogn

@subrat09
I have corrected your code a bit but still its not printing anything for the test case
1
1
0.
Plzz debug your code according to this test case.
This is your updated code.

#include<bits/stdc++.h>
using namespace std;

int main() {
// your code goes here
int t;
cin>>t;
while(t--){
string a;
string b;
/* getline(cin,a);
getline(cin,b);
*/
cin>>a;
cin>>b;
// 0 0 1 1
// 1 0 1 1
int counta=0;
int countb=0;

for(int i=0;i<a.size();i++){
if(a[i]=='0'){
counta++;
}
}
for(int i=0;i<b.size();i++){
if(b[i]=='0'){
countb++;
}
}
int z= max(counta,countb);
int c=min(counta,countb);
int k=(counta+countb);
int o=k-z;
string s;
if(k<a.size()){
for(int i=0;i<k;i++){
s+='1';
}
for(int i=k;i<a.size();i++){
s+='0';
}
}

else if(k>a.size()){
for(int i=0;i<o;i++){
s+='1';
}
for(int i=o;i<a.size();i++){
s+='0';
}

}
//cout<<k<<endl;
cout<<s<<endl;
}
return 0;
}