String function review 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30#include #include int main(void) { char c[] = "hello"; char *d = "bye"; char e[100]; printf("%s %s\n", c, d); // strlen: string length printf("%d\n", strlen(c)); printf("%d\n", strlen(d)); // strcmp: string compare // strcmp(c, d) : 0 ==> equal // strcmp(c, d) : -1(negative) ===> c first // strcmp(c, d) : +1(positvie.. 더보기 이전 1 ··· 10 11 12 13 14 15 16 ··· 20 다음