>>770
あまり感心できないプログラム
BooleanのTrueが1であるという規定はC言語にはない。
↓改良

int ch_count(const char *s, int c)
{
   int n = 0;

   while (*s) {
       if (*s++ == c) n++;
   }
   return n;
}