//char* str = "&abcldotreABorpffr**^%#$@@@@#$&*( d a d c x z c z a q u o e r p pv " 作者: hbpiaoyi 时间: 2016-9-21 09:34 本帖最后由 hbpiaoyi 于 2016-9-25 09:38 编辑
void chCount(const char *str) {
int ch[128] = {0};
while(*str) {
ch[*str++]++;
}
for(int i = 0; i < 128; i++) {
if(ch)
printf("%c : %d\n", i, ch);
}
}