Interesting power difference of binary numbers

Given two binary numbers A,B .Let the i th bit of A and i th bit of B differ by d. We need to form a binary number C such that the i th bit of C = 1, if 2^d is even, else it should be 0.



Implementation:

#include <stdio.h>
#define max 100
int funct(int j,int k)
{
    return j^k;
}
int main()
{
    int t;
    char a[max],b[max];
    scanf("%d",&t);
    while(t--)
    {
        scanf("%s",a);
        scanf("%s",b);
        for(int i=0;a[i];i++)
        printf("%d",funct(a[i]-'0',b[i]-'0'));
        printf("\n");
    }
    return 0;
}


Input : 

First line - (T) Number of Test Cases
T lines containing A and B
Both A, B are of same length

Sample Input
2
111
000
000
111 

Sample Output 
111
111