```
#include <stdio.h>
#include <ctype.h>
void count_characters() {
char text[100];
int char_count[26] = {0};
for (char *p = text; *p; p++) {
if (isalpha(*p)) {
char_count[tolower(*p) - 'a']++;
}
}
for (int i = 0; i < 26; i++) {
if (char_count[i]) {
printf("%c: %d\n", i
+ 'a', char_count
[i
]); }
}
}
int main() {
count_characters();
return 0;
}
```
YGBgCiNpbmNsdWRlIDxzdGRpby5oPgojaW5jbHVkZSA8Y3R5cGUuaD4KCnZvaWQgY291bnRfY2hhcmFjdGVycygpIHsKICAgIGNoYXIgdGV4dFsxMDBdOwogICAgcHJpbnRmKCI6ICIpOwogICAgZmdldHModGV4dCwgMTAwLCBzdGRpbik7CgogICAgaW50IGNoYXJfY291bnRbMjZdID0gezB9OwogICAgZm9yIChjaGFyICpwID0gdGV4dDsgKnA7IHArKykgewogICAgICAgIGlmIChpc2FscGhhKCpwKSkgewogICAgICAgICAgICBjaGFyX2NvdW50W3RvbG93ZXIoKnApIC0gJ2EnXSsrOwogICAgICAgIH0KICAgIH0KCiAgICBwcmludGYoIjogXG4iKTsKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgMjY7IGkrKykgewogICAgICAgIGlmIChjaGFyX2NvdW50W2ldKSB7CiAgICAgICAgICAgIHByaW50ZigiJWM6ICVkXG4iLCBpICsgJ2EnLCBjaGFyX2NvdW50W2ldKTsKICAgICAgICB9CiAgICB9Cn0KCmludCBtYWluKCkgewogICAgY291bnRfY2hhcmFjdGVycygpOwogICAgcmV0dXJuIDA7Cn0KYGBg