int strcmp ( const char * str1, const char * str2 ); Compare two strings
Compares the C string str1 to the C string str2. This function starts comparing the first character of each string. If they are equal to each other, it continues with the following pairs until the characters differ or until a terminating null-character is reached.
Return Value Returns an integral value indicating the relationship between the strings: A zero value indicates that both strings are equal. A value greater than zero indicates that the first character that does not match has a greater value in str1 than in str2; And a value less than zero indicates the opposite.
There may be some upper or lower case issues with using strcmp(). strcmp() will compare the ascii value of the non-matching characters and can assume that the character with the lower ascii value will occur first alphabetically (assuming they are of the same case; an upper case 'Z' will have a lower value than a lower case 'a' for example.) Consider using the tolower() or toupper() functions to make everything the same.
check out the ascii table.