[1] 授業単元:C言語
[2] 問題文(含コード&リンク):
文の中に含まれている単語の個数を返す関数strcnt()を作成せよ。
int strcnt(const char *s1,const char *2);
文字列(文)s1に含まれている文字列(単語)s2の個数を返す。
なお、2つの単語間には空白文字があるとする。
[例]
s1="The theory of computation is a branch of meta-mathematics that
has been developed since the early 1900's.",s2="the"のとき、
strcnt(s1,s2)の値は2である。
[3] 環境
 [3.1] OS: Fedora Core3
 [3.2] コンパイラ(バージョン):gcc?
 [3.3] 言語:C
[4] 期限:2005年1月12日12:00
[5] その他の制限:特になし。
よろしくお願いします。