Computer Science, asked by akanshaanand, 1 year ago

write a function which will take a string and return the word count. each word is separete by space?

Answers

Answered by roshisuhani12
1
int wordCount (char s[])
{
int count=0, i;
for (i=0;s[i]!='\0';i++)
{
if(s[i]==' ')
count++;
return count+1;
}
Similar questions