SHARE
TWEET

Untitled

a guest Sep 17th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. int main()
  3. {
  4.       char s[50];
  5.       printf("Enter any Sentence:");
  6.       gets(s);
  7.       int i=0,len=0,len2,word=0;
  8.       while(s[i]!='\0')
  9.       {
  10.           len++;
  11.           if(s[i]==' ')
  12.           {
  13.               word++;
  14.           }
  15.           i++;
  16.       }
  17.  
  18.       printf("\nTotal blank spaces : %d\n",word);
  19.       len2=len-word;
  20.       printf("Sentence length is %d",len2);
  21.  
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top