include<stdio.h> include<stdlib.h> int main(){ char str[5000] = { 0 }; gets(str); char* forword = str; char* back = str; while (forword != '\0') { if (forword == ' ') back = forword+1; forword++; } printf("%d\n", forword - back); return 0;}