help with functions that count number, string, character(tocke!!!!!!!!

hi everyone , i need a little help with writing functions, that will let a user count the number of string , character,single..(functions that counts tocken).
i've been struggling for few days and i got this so far(to count the number of words)...thanxs

/* this function finds the number of words */

void Word(int wcount);

{
int wcount; /* Word counter */

while (*Textstring != '')
{
while(isspace(*Textstring))
++Textstring;
if (*Textstring != '')
{
++wcount;
while(!isspace(*Textstring) && *Textstring !='')
++Textstring;
}
}
printf("The number of words is: %i
", wcount);
}

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories