What is the error

//https://leetcode.com/problems/add-binary/
char * addBinary(char * a, char * b){
int p=atoi(a);
int q=atoi(b);
int r=p&q;
int i=0;
int temp=r;
while(r>0){
r=r/2;
i++;
}
int k=0,j=0;
char s[i];
while(temp>0){
s[k]=temp%2;
temp/=2;
k++;
}
while(j<i){
s[j]=s[i];
j++;
i–;
}
return s;
}