Explain why this code gives segmentation fault
void fib(int **seq, int n) {
    *seq = malloc(sizeof(int *) * n);
    *seq[0] = 0;
    *seq[1] = 1;
    for(int i=2;i<n;i++) {
        *seq[i] = *seq[i-1] + *seq[i-2];
    }
}
