#include <stdio.h> #define MAXLENGTH 11 /* the max length of word is MAXLENGTH-1 */ typedef enum...{ FALSE =0, TRUE =1 }bool; main() ...{ int c, num, i; int wordLength[MAXLENGTH]; bool current, frontal; num =0; current = TRUE; /**//* current char is letter */ frontal = TRUE; /**//* frontal char is letter */ for (i =0; i < MAXLENGTH; ++i) wordLength[i] =0; c = getchar(); while (c != EOF) ...{ if (c ==''|| c ==''|| c =='') ...{ current = FALSE; if (frontal == TRUE) ++wordLength[num]; frontal = FALSE; } else...{ current = TRUE; if (frontal == TRUE) ++num; else...{ num =1; frontal = TRUE; } } c = getchar(); } for (i =1; i < MAXLENGTH; ++i) printf("world length %d: %d ", i, wordLength[i]); }
#include stdio.h>#define MAXLENGTH 11 /* the max length of word is MAXLENGTH-1 */typedef enum ...{ FALSE = 0, TRUE = 1}bool;main()...{ int c, num, i; int wordLength[MAXLENGTH]; bool current, f