what is the error in the code ???
Regarding the code
Hey @gargshivam2001
Menioned changes in comments : https://ide.codingblocks.com/s/379882
If this resolves ur query then please mark it as resolved
would you please send it again as this file doesn’t contains the solution???
#include<iostream>
#include<cstring>
using namespace std;
int main() {
int n;
cin>>n;
cin.get(); //added to remove \n from input buffer
for(int i=0;i<n;i++)
{
char a[100],b[100];
cin.getline(a,100,' '); //this type of getline is with cin
cin.getline(b,100); //this type of getline is with cin
for(int j=0;j<strlen(a);j++)
{
if(a[j]==b[j])
cout<<"0";
else cout<<"1";
}
cout<<endl;
}
return 0;
}
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.