A character array is just a sequence of char variables, you can read as letters or numbers. To use one with C string functions (as opposed to C++ String Objects, try to avoid using those on Arduino) the last char variable should hold the number zero (not the character '0' as that has value of 48) to tell C where the string is ended. You see, you might have an array of 100 and one time the string is "Hello World" (with a zero byte on the end) and others it may have a longer string of characters.
You can use the C string function strcmp( char *, char * ) that points to 2 strings and returns 1 if they match and 0 if they don't (0 is false and not-0 is true) but --- you won't find it on the Reference page and might have to include the string.h library to use. And hey buddy, you ain't ready for that just yet!
But you can compare and even write your own string compare function if you want. Doing so, you will understand how it works.
byte bufferLen = 20;
char string1[ bufferLen ] = "abcdef"; // 1st 7 values are 'a' 'b' 'c' 'd' 'e' 'f' 0 and after the 0 it doesn't matter.
char string2[ bufferLen ] = 'abcxyz";
byte compareFlag = 1; // default the way I write this is true
byte index = 0; // index will point into the string arrays, count starts with 0, not 1
while ( index < bufferLen ) {
if ( string1[ index ] != string2[ index ] ) { // != means not equal, it happens if the two are different
compareFlag = 0;
index = bufferLen + 1; // or could use break to break out of the while loop but you should see this works
}
else {
if ( string1[ index ] == 0 ) { // since both string1 and string2 characters are the same, I check one
index = bufferLen + 1; // because the zero is the end we stop there, not caring what comes after
} // because what is after may be different but doesn't matter
}
} // and when it is done running, compareFlag is either 0 for not matched or 1 for matched
Sure it is the long way and more typing than strcmp( string1, string2 ) but guess how strcmp() works! So you can package that in a function. I leave it to you just how. You might need to learn some curve but it will benefit you to do so as eventually you'll need to anyway.