int word_num(char *s){ int i,t,len; t=0; len=strlen(s); for(i=0;i if(s[i]==' ') t++; return t+1; }写了一个算出单词数的函数你看看至于每个字母出现的次数我写出来代码太长了,看后面有没有高手进来有好点的程序
http://zhidao.baidu.com/question/85560759.html