/* ** $Id: xmpl.c 820 2008-03-09 17:42:44Z phf $ ** ** Our second example for gcov usage from lecture. */ #include #include #include enum {MAXARGS = 16}; int main(int argc, char *argv[]) { // Establish pair-wise equality between arguments. // Why the heck we would do that, I can't tell... for (int i = 1; i < argc-1; i++) { if (strcmp(argv[i], argv[i+1]) == 0) { puts("Check!"); } else if (strcmp(argv[i], "Hey!") == 0) { puts("Huh?"); } else { puts("Oops!"); } } return EXIT_SUCCESS; }