#include <stdio.h>
int main( ) {
char * string = "aouihuiahsudasduihqmdoiqjnduiamsdoqnwuidamodkjwodkaposdj" ;
int quantidade[ 26 ] = { 0 } ;
for ( ; * string != '\0 ' ; string++ ) {
quantidade[ * string - 'a' ] ++;
}
for ( int i = 0 ; i < 26 ; i++ ) {
printf ( "%c => %d\n " , i
+ 'a' , quantidade
[ i
] ) ; }
}
//https://pt.stackoverflow.com/q/217720/101
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKCWNoYXIgKnN0cmluZyA9ICJhb3VpaHVpYWhzdWRhc2R1aWhxbWRvaXFqbmR1aWFtc2RvcW53dWlkYW1vZGtqd29ka2Fwb3NkaiI7CiAgICBpbnQgcXVhbnRpZGFkZVsyNl0gPSB7IDAgfTsKICAgIGZvciAoOyAqc3RyaW5nICE9ICdcMCc7IHN0cmluZysrKSB7CiAgICAgICAgcXVhbnRpZGFkZVsqc3RyaW5nIC0gJ2EnXSsrOwogICAgfQogICAgZm9yIChpbnQgaSA9IDA7IGkgPCAyNjsgaSsrKSB7CiAgICAgICAgcHJpbnRmKCIlYyA9PiAlZFxuIiwgaSArICdhJywgcXVhbnRpZGFkZVtpXSk7CiAgICB9Cn0KCi8vaHR0cHM6Ly9wdC5zdGFja292ZXJmbG93LmNvbS9xLzIxNzcyMC8xMDE=