testing the contents of a char array