for (; *str; str++)
if (*str == 'c') cnt++;

*str ←なんで*が必要なの
  for (; str; str++)
if (str == 'c') cnt++;

これだとできないのはなぜですか