happpy_2[1]_% cat kadai8-3.c #include main() { char s[10000]; int n; int i; printf("Enter a sentence.\n"); gets(s); n=0; i=0; while( s[i] != 0 ){ if((s[i]>='a' && s[i]<='z') || (s[i]>='A' && s[i]<='Z')){ if( i==0 || (!(s[i-1]>='a' && s[i-1]<='z') || (s[i-1]>='A' && s[i-1]<='Z'))){ n = n + 1; } } i = i + 1; } printf("String=\"%s\"\n", s ); printf("Word count=%d\n", n ); } happpy_2[2]_% gcc -o kadai8-3 kadai8-3.c -lm happpy_2[3]_% kadai8-3 Enter a sentence. There are three things to bear in mind. String="There are three things to bear in mind." Word count=8