
Originally Posted by
aloha123
output woud be: (pluralize one at a time)
webdesign developments on the internet
webdesign development on the internets
A mistake. My code produces a different output. Just change the output generator on the pluralize function to this:
Code:
for (i=0;i<word_count;++i)
{
pl = find_plural(words[i]);
if ((strcmp(pl, words[i])) != 0)
{
for (h=0; h<word_count; ++h)
{
fprintf(fo, "%s ",i==h?pl: words[h]);
}
fprintf(fo, "\n");
}
}
The modified code on my blog here: http://geekzone.freehostia.com/c-wor...tor-pluralizer .