1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<ctype.h> 4 5 int word_cnt(char *str); 6 void word_print(char *str, int beg, int end); 7 //提取单词 8 void word_split(char *str); 9 10 int main() 11 { 12 char str[128]; 13 //int cnt = 0; 14 gets_s(str,128); 15 //cnt = word_cnt(str); 16 //printf("count = %d ",cnt); 17 word_split(str); 18 system("pause"); 19 return 0; 20 } 21 22 int word_cnt(char *str) 23 { 24 int cnt = 0; 25 int i = 0; 26 while(str[i] != '