• + 0 comments

    int main() {

    int count[10] = {0};
    int i;
    char *num = malloc(1000 * sizeof(char));
    
    fgets(num, 1000, stdin);
    
    while (*num != '\0'){
        if (isalnum(*num))
            count[*num - '0']++;
        *num++;    
    }
    for (i = 0; i < 10; i++)
        printf("%d ", count[i]);
    
    return 0;
    

    }