String (1) 썸네일형 리스트형 단어의 갯수 골라내기 확장팩 #include #include #include #define SIZE 1024 int word_cnt(); int word_cnt(char *string){ int count = 0; int nonAlphaContinued = 0; while(*string != '\0'){ // 문장이끝날대 while (isspace(*string)) // 포인터가가르키는인덱스가공백인경우 string++; //다음인덱스로포인터를변경 if(*string != '\0'){ count++; while (!isspace(*string) && *string != '\0') { // 빈칸이아니고, 문장이끝이나지도않을때 if (isalpha(*string)) {// 알파벳인경우 string++; } else if(isalpha(*.. 이전 1 다음