/*! \file strcmp.c \brief Small example that shows how to use the C library routine strcmp. \author Michelle Strout \date October 2008 */ #include #include int main() { char mystr[] = "by"; char other[] = "bye"; printf("strcmp(\"%s\", \"%s\") = %d\n", mystr, other, strcmp(mystr, other)); printf("strcmp(\"%s\", \"%s\") = %d\n", mystr, other, strcmp(other, other)); printf("strcmp(\"%s\", \"%s\") = %d\n", mystr, other, strcmp(other, mystr)); return 0; }