// calloc reserva n elementos y los deja en cero.
#include <stdio.h>
#include <stdlib.h>

int main(void) {
    int n = 5;
    int *counts = calloc(n, sizeof *counts);
    if (counts == NULL) {
        return 1;
    }

    counts[2] = counts[2] + 1;
    for (int i = 0; i < n; i++) {
        printf("%d ", counts[i]);
    }
    printf("\n");

    free(counts);
    return 0;
}
