从这个网站 http://www.programmingsimplified.com/c-program-find-characters-frequency 他们有一个例子可以计算 a - z 但不计算 AZ 或空格或标准标点符号。
while ( string[c] != '\0' )
{
/* Considering characters from 'a' to 'z' only */
if ( string[c] >= 'a' && string[c] <= 'z' )
count[string[c]-'a']++;
c++;
}
for ( c = 0 ; c < 26 ; c++ )
{
if( count[c] != 0 )