comparing data

This is how I would do it

char good[] = {"abcdefghijklmnopqrstuvwxyz"};
byte index;

void setup()
{
   Serial.begin(9600); // Or whatever...
}

void loop()
{
   index = 0;
   while(Serial.available() && index < 26)
   {
       char aChar = Serial.read();
       if(aChar != good[index])
       {
           Serial.flush(); // Dump the rest of the pending data

           // Print out where the mismatch occurred
           Serial.print("Bad character received when index = ");
           Serial.println(index, DEC);

           // Print out what the mismatch is
           Serial.print("Received ");
           Serial.print(aChar);
           Serial.print(" instead of ");
           Serial.println(good[index]);

           // Get out of the while loop
           break;
        }
        index++; // Advance to the next good character
   }
}