Only one test is being passed!
#include<bits/stdc++.h>
using namespace std;
int main() {
int t; cin >> t;
while (t–) {
int a, b;
cin >> a >> b;
// calculate the no of digits
int t = a, c = 0;
while (t > 0) {
c++;
t = t / 10;
}
int ans[c];
for (int i = c - 1; i >= 0; i--) {
int tmpa = a % 10;
int tmpb = b % 10;
ans[i] = tmpa ^ tmpb;
a = a / 10;
b = b / 10;
// cout << ans[i];
}
for (int i = 0; i < c; i++)
cout << ans[i];
cout << endl;
}
}