1 #include<stdio.h>
2 #include<string.h>
3 int main()
4 {
5 int i=0;
6 char ch[]="Linux C is very good";
7 char *b[100];
8 char *p;
9 p=strtok(ch," ");
10 while(p!=NULL)
11
12 {
13 printf("%s ",p);
14 p=strtok(NULL," ");//以 空格结束
15 i++;
16 }
17 printf("%d",i);
18 return 0;
19 }