char *str; if (IS_DIGIT(c)) { str = "digit"; } else if (..) { str = "upper"; } else { str = "misc"; } printf(".... %s", .., str)