#include <stdio.h>

void main() {
    const int lowerCaseStart = 97;
    const int upperCaseStart = 65;
    char str[] = "Hitung{+_' frekuensi 8&29Huruf y]ang munc12ul dik?>alim12at ini!}";
    int character[26];

    for (int i = 0; i < sizeof(str); i++) {
        int currentChar = str[i];
        
        if (currentChar < 65 || currentChar > 122)
            continue;
        
        if (currentChar > 90 && currentChar < 97)
            continue;
        
        int index;

        if (currentChar >= lowerCaseStart)
            index = str[i] - lowerCaseStart;
        else if (currentChar >= upperCaseStart)
            index = str[i] - upperCaseStart;

        character[index]++;
    }

    for (int i = 0; i < 26; i++) {
        if (character[i] != 0) {
            printf("%c = %d\n", i + lowerCaseStart, character[i]);
        }
    }
    
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: