Better solution

Can there be a better solution than mine ?
#include
#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main() {
int t;
cin >> t;
while(t–){
char a[100];
char b[100];
cin >> a >> b;
int x = strlen(a);
for(int i = 0;i<x;i++){
int p = a[i] - 48;
int q = b[i] - 48;
cout << (p^q);
}
cout << endl;
}
return 0;
}

No you solution is okay its in O(n). That much time complexity would already be there while taking input.
But you could have taken the numbers in integer form and xor them or could have used bitset(STL).