I didn't get any output

bhaiiya in this question when I try to run this piece of code
I didn’t get any output whats the problem in my code, please me to debug this ////
#include<bits/stdc++.h>
using namespace std;
int main() {
int t;
cin>>t;
while(t!=0){
string s1 , s2 , ans;
getline(cin , s1);
getline(cin , s2);

	for(int i=0; i<s1.length(); i++){
		if(s1[i] == s2[i]){
			ans[i]=0;
		}
		else{
			ans[i]=1;
		}
	}
	for(int i=0; i<ans.length(); i++){
        cout<<ans[i];
    }
}
return 0;

}

@rajsaxena.personal Please save your code on ide.codingblocks.com and then share its link.

Your loop for the test case in running infinitely since t is not decremented. Also you are not inputting correctly. getline is used to input a sentence. Also after each test case, an endl is required.
Also your string formation in ans variable is not correct.
Check this: