Lucas McLevinsky wrote:And return 1 if they are all the same, 0 if they are different values, and 2 if the values from the corresponding column from the first array are all inversed values from the second (i.e. comparing "1" from the second array to all "0"'s from the first). And do this as many times, as the number of characters in the second array (in this case - 11)
Well, other than the good advice you've already been given, I have a few further tips.
1. When you're working out what you want to do: start with a single column, and describe
exactly what you want to happen
in English (or your native language), NOT in code-speak. Once you have that,
you should be able to simply wrap it in a "for each column" loop.
2. What you've shown us look like binary digits rather than characters, so make them
booleans, even if it means converting them first. If they really are characters, and they can contain values other than '1' and '0', then you need to explain exactly what you mean by "inversed values".
3. In your example, all arrays are the same length; but what if they aren't? Make sure you have a 'Plan B' for when input is invalid, even if it's just to let the program fail.
Winston