So I'd use a main that:
- read the number of tests N
- looped N times
- in each loop called a function to read a binary string and return the number
that function can do the error checking that it's a valid string and return -1 if it isn't
- call a function to do the xoring.