Given is the c program to count number of words in a string
#include<stdio.h>
int main(void)
{
int c;
c = 0;
while(getchar()!=EOF)
++c;
printf(“%1d\n”,c);
return 0;
}
Categories: c programming, Programming and Developments | Tags: c program to count number of words in a string | 2 Comments
Recent Comments