Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include<string.h>
- int main()
- {
- int i,c=0;
- char str[100];
- getchar();
- gets(str);
- for(i=0;str[i]!='\0';i++)
- {
- if(str[i] ==' ')
- {
- c++;
- }
- }
- printf("Total space %d\n",c);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement